包含标签:Java 的文章
-
Find the maximum product of negative numbers in Java
I'm taking a semi - advanced course in Java I taught myself JavaScript as a hobby, so I'm not a real beginner, but I'm…… -
Java – unexpected tags in kotlin (use; separate expressions on the same line)
I use kotlin in my android project, which is developed on Java. I use kotlin data classes in the service layer Now I w…… -
Java-8 – sum and max values in a single iteration
I have a list of custom callrecord objects public class CallRecord { private String callId; private String aN…… -
Java – how to calculate the length of multiple strings
I have a string like this: Hey, my name is $name $; I'm over $years old. I like playing $sport $. I live in $country $…… -
Java 8: merge 2 string lists into the map
See English answers > clearest way to combine two lists into a map (Java)? 15 List<String> keys List<Strin…… -
Java – mulestudio Studio: Studio target failed to execute
I copied / pasted a work project in the mule studio workspace (from mule studio) to create a new project After that, I…… -
The pre constructor initializes the properties of variables in Java
In Java, you can initialize programming variables before calling constructors public class StockGraph extends JPanel {…… -
Java – collect results from parallel streams
I have a code like this: List<Egg> eggs = hens.parallelStream().map(hen -> { ArrayList<Egg> eggs = …… -
Java – Jackson – serialize Boolean to 1 / 0 instead of true / false
I have a rest resource to receive a JSON object, which is a mapping from a user ID to a Boolean value, indicating whet…… -
Java – why does a new string with UTF-8 contain more bytes
byte bytes[] = new byte[16]; byte bytes[] = new byte[16]; random.nextBytes(bytes); try { return new String(bytes,"U…… -
Model view controller – JavaFX includes fxml in fxml without controller
I am writing an application using JavaFX My scenario is defined in different fxml files Because I tried to use MVC mod…… -
Java Stream Collectors. Tolist() does not compile
Anyone can explain why the following code can't be compiled, but what about the second code? Do not compile private vo…… -
Java-8 – optional, do not handle null elements
When I experiment with optional < T >, I do not process null elements, so in the following example, it throws Nu…… -
How to add a scrollbar in JavaFX
I'm trying to add a scrollbar to H@R_869_2419 @Yes Scrollbar was added, but I didn't scroll How can I make it work? pu…… -
Java – get all rejected additions to set
I'm not very good at hashsets. I want to know if I can use them The addall method retrieves duplicates deleted by hash…… -
After adding the default method in Java 1.8, does the interface remain completely abstract?
After adding the default method in Java 1.8, does the interface remain completely abstract? I'm sorry if I can't state…… -
The list of Java objects is sorted by specific objects, not by
I have the following jsonarray trying to sort it So, to convert my jsonarray to ArrayList, then sort them and convert …… -
Cannot add an object of type T to the list in Java
I've been learning generics in Java Although I understand the concepts of type inference, parameterized classes and me…… -
Java – Android retro fit: missing method body or declaration abstraction
I'm writing an Android application that will use retrofit to make API requests I have such a helper class: public clas…… -
Java – boxed Boolean equivalent
Quick question: are you sure this code is always true? Boolean b1 = true; Boolean b2 = true; System.out.println(b1 == …… -
Is java “public static void main (string [] args)” the only way to create a main method?
I wonder if "Java main method" is the only way to create a main method in Java Java main methods: Solution The JVM nee…… -
How to initialize 2D string array in Java
I know how to declare arrays. I've done this: String[][] board1 = new String[10][10]; Now I want to do this. By defaul…… -
Java – build executables from different jars
I wrote a program that contains various Java libraries used in the program I used NetBeans to make the jar file of my …… -
Lambda – iterates over two lists using a Java 8 stream
How do I write the following in a Java 8 stream? int total = 0; for (ObjectA obja : rootObj.getListA()) { for (O…… -
How to make Java wait for user input
I'm trying to make an IRC robot for my channel I hope the robot can get commands from the console In order to make the…… -
Java – why is the difference between specific dates (03 / 12 / 2018) not the exact number of days?
I'm facing a strange problem with Java (versions 6, 7, 8) In this code, I try to calculate the date difference between…… -
Java – spring data JPA cannot be configured: the specified class is an interface
I have started using spring data JPA Unfortunately, I can't configure it I have entity class and repository interface,…… -
How to create a string representing Java as if it were an unsigned 64 bit value
My component was passed a long value, which I later used as a key in the cache The key itself is a string representati…… -
The Java iterator gets the next one without incrementing
I write the following loop in Java for each loop that I want to access the current and next elements of the link list …… -
How to cut the Java of each loop in half?
I'm working a lot for each loop in Java I'm using them to "draw" every class of my object, but it requires a lot of me…… -
Java – how to invert large arrays?
OK, so I know it's very easy to reverse the array by swapping items until you reach the middle like this: int array[SI……
