包含标签:Java 的文章
-
Bean validation message with dynamic parameters
I started using bean validation, and I'm trying to build constraints My constraint is to verify CPF (personal file in …… -
Java – spring startup projects imported in IntelliJ do not work
I have imported the spring boot project generated by the spring boot initialiazr website, and I can't find the spring …… -
Java – ArrayList to array conversion – toarray() function infers that the type does not meet the upper limit error
This is the code simplet: Excel excel = new Excel(); ArrayList<Integer> a1=excel.readExcelSheet("C:\\Users\\Madh…… -
How to add classes that implement interfaces to ArrayList
In order to implement all methods in the interface, I created an abstract class that implements the interface, and the…… -
Java – why is there no exception in this byte?
I initialized a byte as follows: byte b = (byte) 0b11110000000; Since a byte is 8 bits in size, I expect it to throw s…… -
Lambda – the Java 8 stream is composed of three fields and aggregated by sum and count to produce single line output
I know that similar problems have been raised in the forum, but none of them seem to have completely solved my problem…… -
External configurable filtering using java lambda
Suppose I have an external JSON: [{ "condition": "equals","field": "name","value": "jack" },{ "condition": "…… -
Java – Maven: exclude the “meta-inf / Maven” folder from the jar
I use Maven to build jars When I checked the jar, I saw a maven folder in the meta - inf folder I want it to be exclud…… -
String concatenation does not work in Java when concatenating two results of a ternary operator
Dear Java master! Please explain why concatenation does not work properly in Java when connecting two results of terna…… -
Java – programming the difference between POJOs and beans
I have the following two classes Can I say that the first is a POJO class and the second is a bean class? 1) POJO clas…… -
Why is the combiner function reduction operation not performed in the java-8 stream?
See English answers > java 8 stream – reduce function's combiner not getting executed Stream.of(1,2,3,4,5,6,7).redu…… -
Java – returns only the last element in the ArrayList
I've been teaching myself Java. I've always insisted on a problem. No matter what I do, it seems that I can't solve it…… -
Using java to convert children to parent problems
class Parent { class Parent { int i = 60; } class Child extends Parent { int i = 70; } class Main { pub…… -
Java – how do I use group mapping streams?
I have a long child // ordered by parent.id / child.id Stream<Child> childStream; Say, Child(id = 1,parent(id = …… -
Java – how do I check that the value is equal to at least one field in the list?
I have this method: for (String fieldName : fieldArray) { Query query = new Query(); query.addCriteria…… -
Java – 25 even and even random number generator
I need to generate 25 random numbers and divide them into two arrays, depending on whether they are odd or even This i…… -
How do I scroll down to click an element in Android using appium and Java?
I wonder how to scroll down to click an element in Android using appium and Java? I have a list of elements in "Androi…… -
Java – why does my scanner still need a blank char
Input: 1 2 3 Objective: each number will be filled in the same array Space will be excluded Scanner in = new Scanner(s…… -
Java – JUnit: call @ after to set the object to null
Suppose I have the following simple JUnit test private Person person; @Before public void createObject() { String …… -
Java – if the return type of the rewriting method is original (such as double), can we change the return type of the rewriting method (such as int, char)?
As follows: Method to override: double add (int a,int b){ } Method of covering the above method: int add(int a,int …… -
Java – array initializers are not allowed here
I have some model classes. I try to declare a list with them, but I get that the array initializer is not allowed here…… -
Java – cut and stack arrays
I have an int array as input The length of the array is always 2 ^ n. I want to cut the array in half and stack it Rep…… -
Java cucumber: obtain @ cucumber options from external sources, such as property files
Whether it can be from Java Get the cucumber option value from the properties file? In this so post, it shows that it …… -
Java – Convert list to map and filter null keys
Using the Java 8 stream, I want to convert the list into a map as described in the solution of Java 8 list < V >…… -
Java — call Runtime. in the onLowMemory method. gc()
Should we use runtime GC () or system GC () to clear the memory in the production code in the onlowmemory () method in…… -
Java Runtime. getRuntime(). Freememory() problem
I searched and saw some threads, but none solved the specific problem I encountered I tried to use runtime getRuntime(…… -
Java – should hibernate use a unique sequence for each table?
I have several entities using automatic key generation strategies with hibernate and Postgres @Id @GeneratedValue(stra…… -
Pass checkstyle to Java Hello World
So I'm a novice using checkstyle. For my simple HelloWorld Java program, I received a lot of errors that I don't under…… -
Convert an existing c# synchronous method to asynchronous using async / await?
Starting with the synchronous I / O binding method (shown below), how do I use async / await to make it asynchronous? …… -
java – android. support. v7. app. ActionBarImplICS. Getthemedcontext NullPointerException in Android
Please help me get Java lang.NullPointerException java.lang.NullPointerException at android.support.v7.app.ActionBarIm…… -
Java – eclipse / ant creates a jar in version 1.9, even if everything seems to be set to 1.8
I have a project built using ant and eclipse, and I want it to be compatible with Java 8 When I try to run jar using j…… -
Java – where does Maven search for log4j Properties file?
I am using log4j with Maven to face problems I have a properties file, log4j Properties, I put this file in the POM. N……