Java
-
Merge sort Java
I'm trying to create a merge sort method, but it continues to give the wrong sort Where do I make changes to actually …… -
Java – can I create a bitmask for ~ 100 constants?
Does this mean that the 100th constant must be 1 < < 100? Solution You cannot do this directly because the maxim…… -
Java – returns the number of rows in a 2D array?
I have this 2D array: private boolean[][] landscape; This landscape array defines a pond with [rows] and [cols] The pu…… -
Char range in Java
The following line of Java code generated an error char c = -128; Solution Char is a data type that is not signed in J…… -
Short condition, Java
I want to test whether the current char is', ',' – ',' Or‘‘ if((current != ' ') || (current != '.') || ...) Any ideas?…… -
Java – cannot run Hello world on drools – kiecontainer does not select DLR files from the classpath
The following documents: 6.1 The basics I created a simple class applicant, which should be checked by using the DRL f…… -
Java – how to avoid code duplication of many small classes?
I have different courses, including English, Spanish, French, etc Class English{ String name = "English"; Stri…… -
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 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…… -
Java ternary operators and setting circular index values
I have a loop that traverses the for loop of ArrayList If the condition is met in the for loop: >I delete the curre…… -
Accessing private collection fields in Java
One of my classes has a field containing set This field is only populated in the constructor and then read by other cl…… -
Java – what is the purpose of using aslist?
I just want to know the benefits and purpose of the aslist () method in arrays It returns a fixed size list supported …… -
Java – what is the purpose of the access modifier
Do you need access modifiers in your programming language? Solution See: encapsulation (Wikipedia) Of course, you can …… -
Sorting array lists in Java
I have finished class Here, iris is another class with certain properties public class Helper { Iris iris; do…… -
Java – how to create a new object with the constructor in array list as one of the parameters?
I have a problem with a constructor that takes ArrayList as one of its parameters public class ItemisedProductLine ext…… -
Java – super fast autocomplete using binary search in sort files (300000 lines)
In my android app, I want an input field with autocomplete The number of projects is about 300000 The best solution se…… -
Java – \ u0026 \ u0026 operator problem
In the following code & & the syntax error is given in the if else statement. I'm not sure how to solve it Can…… -
Java – 2D ArrayList
This is just a very small problem... I seem to have encountered too many complex problems: I have to implement an inde…… -
Use the string comparison in Java again
Novice problem, but I have this Code: import java.util.*; import java.io.*; public class Welcome1 { // main meth…… -
How to handle Boolean values in Java through bitwise operators
Consider this example int i=11,j=5; boolean b=true,c=false; System.out.println(b&c); // --> output=false System…… -
AWT or swing for Java for GUI building?
I need to form a fairly simple GUI for the server monitoring process It will have tabs that can cause log tailing, res…… -
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 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 – byte constructor and byte Differences between valueof () methods
Byte byte1=new Byte("10"); Byte byte1=new Byte("10"); Byte byte2=Byte.valueOf("10"); System.out.println(byte1); Syste…… -
Java – using transformers. Java in Hibernate Aliastobean populates sub beans
I have the following beans: Address { String name; String number; String zipcode; String town; } MyEn…… -
java – @Override on Implementation
Will you put comments in the implementation class methods? Is it useful? If you input wrong or no input, it is a compi…… -
Java of jar file
I created a Java application and packaged it into a jar file on the windows platform Now I want to deploy the jar file…… -
Is this statement correct in Java?
I want to use datagram socket to transfer data between two computers I use the following lines: host=InetAddress.getBy…… -
Java – why is this non greedy regular expression more than I want?
I think it should return to "state, country", but it is returning to "country" System.out.println("city,state,country"…… -
Java: trying to get the percentage of integers, how to sort it out?
I have two integer values, X and the sum I tried to find the percentage of total X That's what I'm doing now: Percenta…… -
java – Math. How does random () generate random numbers beyond the “native” range?
As far as I know, math Random () itself generates random doubles between 0.0 and 1.0, including 0.0 but not 1.0 I also…… -
Java – exception: add a window to the container How?
I have a jdialog class called preferences This class creates a constructor, such as: class Preferences extends javax.s……