Java
-
Java – button with rounded corners in Android
I want to create buttons such as the register and login buttons >Using shape drawable The results so far are not sa…… -
The most lightweight Java collection
If I want to create a Java collection and just want to fill it with elements and traverse it (I don't know the necessa…… -
Java – splits the list into sub lists according to the conditions of the stream API
I have a specific question There are some similar problems, but these problems are either Python or Java, or even if t…… -
How does this java code work?
public static void main(String[] args) public static void main(String[] args) { int [][]shatner = new int[1][1]; …… -
Java 8: changing the value of the entryset stream
I have the following settings: My problem is that strings as project map values are marked with tags I want getitems (…… -
How to modify the final StringBuffer value after creation in Java?
I know the final variable characteristics It cannot change from its initialization state however How is StringBuffer d…… -
java – XML vs JSON. Which is better for storing small pieces of data?
See English answers > What are the pros and cons of XML and JSON? [closed] 17 1. Which is better? XML or JSON for s…… -
Java – “startswith” is faster than “indexof”?
I write code in Java to cycle through the dataset at the same time according to whether the string starts with some ch…… -
For multiple lock attempts, use Java concurrent. ReentrantLock
I noticed the following code block: final Lock s = new reentrantlock(); for(int i = 0 ; i < 1000 ; i++) { …… -
Why doesn’t Java use the out parameter in c#’s language syntax?
Although I'm not a big fan of using the out parameter in c#, I wonder why Java chose not to include it in its language…… -
Why is this code sent to me stackoverflow in Java
I tried to use long and double with C, K, n variables, but NetBeans showed a stack overflow error: public class Main {…… -
How to use JTable’s row classifier to restore the original row order?
I have enabled sorting in JTable using the setautocreaterowsorter method Clicking the column header will switch betwee…… -
Sorting point lists using java
See English answers > sort ArrayList of custom objects by property 25 Solution Yes, create a custom comparator and …… -
Import the textfile and read it line by line in Java
I want to know how to import a text file I want to import a file and read it line by line thank you! Solution I don't …… -
Thread problem in Java HashMap
Something happened that I'm not sure should work Obviously it's because I've seen it, but I need to find the root caus…… -
C command line strings like Java?
Is there any way to get the C string from the command line, just like in Java? public static void main(String[] args) …… -
How to map a vector to a map and push duplicate key values into it?
This is my input data: [[:a 1 2] [:a 3 4] [:a 5 6] [:b \a \b] [:b \c \d] [:b \e \f]] I want to map this to the followi…… -
Java – design GUI for J2ME applications
How to create J2ME application for mobile phone using GUI similar to menu displayed in java game? I've tried using Net…… -
Can you comment on my java game?
I have marked this question as a community wiki, so no reply points will be thrown I made this game, forest defender, …… -
Java date() giving the error date
See English answer > java parsing string to date 1 It is obvious that there are not 43 days in February. I don't kn…… -
How do I return flags and optional messages in Java?
I want to write a method in Java to verify whether some data exists for some conditions, confirm that the data is vali…… -
Java – why do we have to declare dependencies on the JBoss 8 (wildfly) manifest?
The following ear is given: > my-app. ear > my-ejb. jar > my-webapp. war > lib > my-lib. jar My EJB nee…… -
How to get value from Java enumerations
I have an enumeration that looks like: public enum Constants{ YES("y"),NO("N") private String value; Constants(…… -
Java – about sorting algorithms applied to stacks and queues
I wonder why we always use sorting algorithms (such as insert sorting or merge sorting,...) only for lists and arrays?…… -
-
How many threads run in Java?
I have this wonderful idea to speed up the time required to generate 36 files: use 36 threads! Unfortunately, if I sta…… -
Java – replace the contents in curly braces with something else (e.g. {1}) [copy]
See English answers > java: string formatting with placeholders 3 Hey {1},you are {2}. Here 1 and 2 are keys whose …… -
Java: bad operand types
I'm a beginner. I'm sorry if this question is stupid I wrote the following code: public class Traindata { String City;…… -
Java and windows – error: illegal escape character
I have finished changing registry data Java file But I'm running runtime getRuntime(). An illegal escape character err…… -
Java double gets all numbers after dot / comma
This is a simple task, but I can't solve it myself I have double digit1 = 12.1; double digit2 = 12.99; And need a …… -
Java – a naming convention for variables that work like constants
I have a variable that I'm using like a constant (it never changes) I cannot declare it as a constant because the valu…… -
Deprecated in Java 1.6
In Java 1.5, to discard a method, you will: @Deprecated int foo(int bar) { } Compiling in Java 1.6 results in the foll……
