Java
-
Recursive merging of Java – N-level mappings
Is there any way to deeply merge maps in Java? I've read some posts about it, but most solutions seem to deal with onl…… -
Java – how do I do this?
I'm a beginner. I want to write java code in eclipse The program takes linkedlists of two integers (for example, a and…… -
Java Rounding Up
How do I set the value of numbergrade so that if it is 89.5, it becomes 90 Numbergrade is treated as double, but makin…… -
-
Java – why does the code in finally execute even if it is returned in a try block?
Code: public String get() { try { //doSomething return "Hello"; } finally { System.out.print("Finally")…… -
Why did you choose to use the finally statement instead of the catch statement? (JAVA)
I'm new to Java and I'm still trying to understand the basics I've been learning exception handling in the form of try…… -
Java – how to convert a double to a string in Android
I want to convert a string to double in my constructor. I can't change it in the constructor, because in a process, th…… -
Java – static variable reset on program restart
I have a problem with static counter variables In the super class ("card"), I have a variable to calculate the number …… -
String. The split (string pattern) Java method did not work as expected
I'm using string Split () divides some strings into IP, but it returns an empty array, so I use string Substring () fi…… -
Java – why must the float value be declared twice?
I'm confused why floating point values must be declared as in any other value, but they must be declared before the va…… -
How do I pass an integer wrapper class to a method in Java?
Ex in Java: class A { private Integer x = new Integer(0); public void setValue(Integer q) { q = 20; …… -
Java – can I skip tracking of Android applications?
I'm planning to make an application for Android 2.1, which uses the audio device ATM to change songs every minute (thr…… -
Java – update ArrayList with HashMap
I just started learning to use HashMap and read the java tutorial, but I was in trouble I'm trying to update the list …… -
Java – create treemap visualization
I want an algorithm for creating treemap visualization Like this: an easy way to make a treemap The problem is that I …… -
Java – multiple clicks of the same button
The idea is that the button can perform one action on the first click and different actions on the second click button…… -
How do I start a background thread that does not block the main java thread?
I have the following java code: public static void main(String[] args) { new Thread(new MyRunnable()).run(); s…… -
Java – creates a list of entries and makes each entry clickable
I'm trying to create a UI with two panes In the left pane, I display a list of files and the right pane displays the c…… -
What is this widget called in Java?
I've been trying to find this widget and I don't know its name I should add the arrow key (in | de) to create the valu…… -
Java – how to set the time limit of online examination
I'm doing an online exam project because my requirement is to set a question in one page. The maximum time limit for t…… -
Java – boxed values are unboxed and then repacked immediately
I received the findugs error "boxed value is not boxed, and then repack it immediately" This is the code: Employee emp…… -
Java: why not declare static intead that passes references?
Suppose we want to make a game where you have to collect gems So we need a gem class, a gemspawner class and, of cours…… -
Java – convert from numeric string containing comma to int
I have such value: String x = "10,000"; I want to convert it to int. I can convert it by removing the following Comma:…… -
Java – multiple values of columns in the database
Whether multiple values can be stored in database columns If so, which type should I use? And how to insert values thr…… -
String literals and string objects in Java
In Java, string can be created in the following two ways >String foo = "test"; > String fooobj = new String(“Tes…… -
How to get the (n) index of characters in a string?
Suppose you have a string like this: String longStr="someText1@someText2@someText3@someText@someText4@someText5@someTe…… -
Changing colors using LinearLayout and textview in Java (Android)
I'm a relatively new Android Developer. I noticed that it seemed strange to me. I hope someone can explain I have Line…… -
Multithreading – thread safe deletion of linked list nodes using fine-grained methods
Why is it not thread safe to delete the following code snippet of a node in a linked list? Edit: note that each node h…… -
There are more than 1 commands in the Java 8 foreach function
Is it possible to import the map.xml in Java 8 Multiple commands used in foreach function? So instead of: map.forEach(…… -
How to select a random item from ArrayList in Java?
See English answers > randomly select an item from a list ArrayList<Integer> mylist= new ArrayList<Intege…… -
Java – ArrayList. Java that causes NullPointerException Add() method
The longinteger class causes the following error at runtime: Exception in thread "main" java.lang.NullPointerException…… -
Java in Java util. Map. Contains() method call
Is there any way to call java. in JSP? util. Map. Contains () method, where map is the attribute of the bean Solution …… -
Java – how to set text to an integer and get int without receiving an error
I'm trying to get intent from integers String fetch intent works normally and displays well, but when I put integers, ……