java's questions - English 1answer

8.820 java questions.

I was looking at this answer on SO to handle units in java. The concept was interesting to me, except I didn't like that it had to be per object that had mass, instead of encapsulating a ...

Global Map Holder

0 answers, 11 views java
Global Map Holder - I want to make it more SOLID and DRY There are 2 aims of the packages: First is to provide easy access to 3 csv files: * currencies fix rates (nbp) * programming languages list (...

I created a custom responseModel to have a standard json responseModel for some of my different RestController. Superclass TransactionResponseModel: ...

This is what I wrote to validate JSON to the given schema. ...

I've created a program that translates any word into the form of igpay atinlay or pig Latin! I got the project idea from here and you can read the rules here. My program outputs the same translation ...

Given an array of integers, print sums of all subsets in it. Output should be printed in increasing order of sums. Input : arr[] = {2, 3} Output: 0 2 3 5 Input : ...

i want to insert marks of student, meaning that each student have his own marks, and have his id, now i want to insert list of students, each with unique identifications, means in list of student, ...

Given an array of integers (both odd and even), the task is to sort them in such a way that the first part of the array contains odd numbers sorted in descending order, rest portion contains even ...

This is a program that uses the Quine McCluskey algorithm to simplify user inputted minterms. This is the main ...

Vowel Counter 2000

2 answers, 261 views java beginner
Today I present to you a program that: Identifies vowels and their total number Prints each vowel's numeric value Adds the numeric value of each vowel found Prints which letters are NOT vowels If ...

I have created a service that will act both as bind and foreground. Am I doing it in the right way? Kindly review it. ...

I am attempting to create my own speech to text assistant. This involves the user speaking and the assistant responding to the user's input. I do this by looking for keywords that indicate the user ...

I am trying to create a class which implements the Comparator class. The thing is that I have a list with some objects. This object is composed of 3 fields (...

I have added a correct question callback for different types of questions like: radio, checkbox and descriptive.. QuestionListActivity.class (it shows the list of questions to attempt) ...

I have a method in Java that I'm using to partition byte[] arrays into a number of fixed-size sub-arrays. It's not necessary for the last array to be that size, but all preceding ones must be, and the ...

I have this regex:(\d?)[A-Za-z](?=(\d?)(.*))(?=(.* ){5})It would be used by me for Chess FEN strings. I wonder if regex ...

I have a series of unit test classes that use various connections to a database. Every test class uses two methods with the JUnit annotations BeforeClass and AfterClass to start and stop the database ...

For some time now, I've been working on a game which is superficially similar in appearance to this one. A world is filled with particles that move and change state frequently (per frame, often). ...

I have Activity1, where I display Room database entries in form of LiveData in a RecyclerView, and Activity2, where I have the necessary fields to add and update new entries. I wonder what is the ...

I'm working on developing an application to shorten links. Part of that requires me to be able to get the "next" string based on an allowed character ranges, as if we were counting up. Characters go ...

I currently collect all of the variables from my GUI in the Enter button action. Is there a way for me to get all of this out of my enter button and into another class to clean up the look of it?<...

I recently applied for a Java developer position and I was asked to completed a coding task. After review of the coding task, the company said they do not want to take me forward to interview. They ...

I'm new to Android development and this is my first request for a code review. Constructive criticism is very welcome! I've written a class to wrap interaction with Google's ...

I'm writing a basic program that calculates the total base resources needed to craft items in Minecraft. It's intended to be modular for support for modded versions of Minecraft (new items or ...

A utility method StringUtils.replace to replace multiple search strings simultaneously. I'm looking for a review of any and all aspects, but especially: Is there's ...

Measuring the effect of Parallelization Using one of the suggested methods in class ( p-threads, OpenMP, C-Sharp or Java Threads) implement an application that adds two integer vectors (A,B) and store ...

I was reading the MODELS - VIEWS - CONTROLLERS paper by Trygve Reenskaug from December 1979 and wanted to try an implementation with Java Swing from my understandings. Notes I have taken are as ...

You will be given an integer k and a list of integers. Count the number of distinct valid pair of integers (a,b) in the list for which a+k=b. For example, the array [1,1,1,2] has two different ...

I want to check for a condition in a guarded wait() loop with a user-specified total timeout, similar to how ...

I have tried to create the async task using the RxJAVA2. The code is working fine. WHat enhancement can I do in this code? ...

so I wanted to insert an item after and this is my code for insertitembefore: ...

I am adding a multi type question to firestore: ...

The code of my Guice Module looks like this: ...

Spring Boot DAO

2 answers, 40 views java spring
I am using spring boot with NamedParameter JDBC. Please suggest any improvements to my code. This DAO first determines which datasource to connect to which is based off the condition of the request ...

I am using Java to create an Android app. I have the main activity read a CSV file, create objects, and then save them into a singleton class so the rest of the activities in the app can access them ...

I have a 20x20 field that contains Square objects. Each Square contains a Rectangle that is ...

How can I remove the code duplication in this code? It is trying to cast the left and right numbers as integers or doubles and then using it. ...

In the same project as in my previous questions I have released a new beta ("0.1.24b") of the game we call "Moon Buggy". It is now possible to get the background to change when completing a section, ...

I'm developing an audio recorder app for android using AudioRecord class to have a low level access to audio samples. ...

Breakout-style game

1 answers, 63 views java beginner game
I'm trying to learn how to program with Java which is more or less my first programming language (had some basic Pascal and C,C++ in school and college) but still a Beginner, with a capital 'B'. ...

Description The ActivityLifecycleHelper uses wrap(Context)to create the class and save a global ...

I'm coding a turn-based RPG battle simulator (text based) in Java. I'm doing this as an exercise/project to learn OOP design. I've coded something similar in C, but just porting that code over to ...

I'm learning Java and I created a simple solution for the following problem: Given a file [filename].txt such that each line has the format ...

How can I create stopwatch a assembly code for Atmega328p micro controller is there any one providing this code?

Readability Vs Efficiency V1 and V2 are equivalent. V1 is more readable, but V2 saves the call to function_call_2. What should be the ideal choice? V1 ...

I'm new to Java and am following a series of lectures on Stanford's YouTube. I know that the code works, but I'd like to know if it can be improved upon. ...

I am in the middle of developing a Spring Boot application, which has a service acting like a bot. advertisementService.update(Advertisement ad) is a method which ...

I have this item (an item is an object linked to a xml view), to build it I need 2 things, get labels from codes, and get text from the strings.xml android file. please ignore the long to int and int ...

I would like to have some input here if possible, this code should make a request to an API and the call should return the desired object. The client to make the requests was made with Retrofit and ...

I'm trying to find the smallest integer greater than 0 that is not in a given list. For some reason, this code outputs 1, because java thinks 1 and "smallest" are different values. Can somebody please ...

Related tags

Hot questions

Language

Popular Tags