Java
-
Java – how to schedule a task every “n” seconds in the spring framework
How to connect to my web XML task occurs every N seconds In addition, I need to refresh the server method every 5 seco…… -
Java – why does this nested ArrayList code throw an exception?
ArrayList<ArrayList<Integer>> a = new ArrayList<ArrayList<Integer>>(5); ArrayList<ArrayList…… -
Java – why does concurrentmodificationexception appear when deleting from HashMap?
I want to delete a project from HashMap by applying criteria Consider the following codes: Set<Foo> set = myMap.…… -
Java Naming Convention
I've been studying Java hard for the past week, and so far I've been able to generate reasonable code However, I seem …… -
Dynamic array in Java
What I want to do is ... int sum[]; ... for(int z.....){ ... sum[z] = some_random_value; ... } But it gives a…… -
Loop problem in Java
What is the error in the following code? while ((char t==(char) system.in.read())!='0') Solution You cannot declare a …… -
Java – how to generate a unique ID on a web server cluster
In the following scenarios: 1 database 4 web servers How does the web server generate unique IDs for databases to make…… -
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…… -
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 – is it acceptable to always use ‘this’ as a monitor lock?
For example, I have a class with 2 counters (in a multithreaded environment): public class MyClass { private int cou…… -
Call the child method when converting to the parent type in Java
I am trying to complete some course work. Any help will be appreciated! I have three types of accounts that extend the…… -
Java – Android studio autocomplete
I just switched to Android studio, and even with a few errors, I think it's much better than eclipse However, somethin…… -
Java – syntax error: Insert ‘}’ to complete the block
My code keeps going wrong I'm making an application to generate quotes Who can help me with this? Whatever I try, I ge…… -
Exception in hexadecimal to int number format in Java
I encountered a number format exception while trying to do this int temp = Integer.parseInt("C050005C",16); If I reduc…… -
How to get elements from Java ArrayList
I have a basic question I have this ArrayList: @Named("AccountProfileController") @ViewScoped public class AccountProf…… -
Are there any Java APIs or built-in functions to solve annuity problems?
My boss asked me to create a module to calculate reverse compounds The question is: if I want to achieve $1.000 in 24 …… -
Java – adds a char to the string at position X
public String addLetter(char letter,int position,char[] word){ public String addLetter(char letter,int position,char[]…… -
Java – why is my field not initialized to the value I gave it
I have the following courses: public abstract class AClass { public AClass() { aMethod(); } abst…… -
Java – search the scala list to find what matches the attribute
What are the usual Scala methods? I have a list. If I find something that meets certain conditions, I want to return "…… -
Java – Oracle – pool connected to spring framework
We are trying at @ L_ 301_ Implement Oracle connection pool with the help of 0 @ framework We are using the DBCP conne…… -
Java – use list Multiple use of size () or variable? (local optimization)
I have a simple function called many In this function, I have many call list sizes (including about 10 elements): list…… -
There are many if conditions in Java
I just started learning Java and have a very basic problem I have a label. I want to change the color when a random in…… -
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 {…… -
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 – why are different long values converted to the same date / time?
public static void getTime() { public static void getTime() { SimpleDateFormat sdf = new SimpleDateFormat( "yyyy-M…… -
Java – NullPointerException when using customlistadapter
I created customlistadapter in Android appiclation But when I implement it, I get this error NullPointerException This…… -
Java: generic filter mapping function
I'm trying to develop a general function to filter maps My code so far is: public static Map<?,?> filterAttrs(Ma…… -
Does the java compiler pre calculate the sum of text?
int i = 10 + 20; int i = 10 + 20; Is it true that the compiler will process this code, add 10 and 20 bytes, and the co…… -
Java – how do I set the resource ID for a token?
I try to use this guide to implement restful web services of oaof: https://spring.io/guides/tutorials/bookmarks I can …… -
Java – jtabbedpane: displays the task progress in the tab
I have a simple swing Java application that performs a search and the results are displayed in a new tab When the sear…… -
Java – the trouble of iterating HashMap using JSF, myfaces, and facelets
I had some trouble looping through HashMap to print its values to the screen Someone can check my code carefully to se…… -
Java – a document error that occurs when a node is appended to XML
public static Node createNodeFromXMLString(String xml) throws SAXException,IOException { public static Node createNode……