java java

Java
4 months ago

Java Operator: |=

Java
I just came across the following line inside some sourcecode. int sequ |= element.sequence What does the operator |= mean ? I haven't seen that bef...
1 year ago

Java / Generics

Java
I hava implemented a generic arraylist with public Object[] toArray() { return elementData; } to be able to sort it later. When i tr...
1 year ago

Java: ArrayStoreException

Java
I would like fill an external array with the elements of my ArrayQueue via E[] toArray(E[] a) , but somehow it throws ArrayStoreException at the first...
1 year ago

Java MySQLSyntaxError

SQL
I'm building a program around a MySQL database using JDBC Driver. I'm stuck at this point. loginWindow lW = new loginWindow(); try { PreparedState...
1 year ago

Java double.MAX_VALUE?

Java
Hello there I'm in my first year of Computing System Development so I am pretty new to Java and getting to grips of the basics! For my first assignm...
1 year ago

Java Runtime.exec()

Java
I can run this command from the command line without any problem (the validation script executes): c:/Python27/python ../feedvalidator/feedvalidator/...
1 year ago

Java expressions

Java
I am trying to understand this code in Java 7 environment, int T = getIntVal(); while (T--> 0) { // do stuff here } T is not modified within th...
1 year ago

Java Connectivity

MySQL
I have a scenario, I have a module in eclipse where need to insert a data into my sql. Here the connection is established successfully and code to ins...
10 months ago

Java Collections

Java
I am adding the following to the HashMap collection after each row in the UI form Declaration Map<String, List<String>> map = new HashMa...
9 months ago

NullPointerException (Java)

Java
I've tried looking at posts on this issue but am still having some trouble with this error in my code. So in the fourth line, I create an instance var...
6 months ago

Java Delegates?

Java
Does the Java language have delegate features, similar to how C# has support for delegates?
7 months ago

Javassist, java

Java
I'm doing a task to create a java-application. The task is to change the method (calculation formula) without recompiling the application. After searc...
6 months ago

Activity Java

Java
5 months ago

Java += operator

Java
Until today I thought that for example: i += j; is just a shortcut for: i = i + j; But what if we try this: int i = 5; long j = 8; Then i = i...
1 year ago

Java: comments /* * * */

Java
Quick question, it there a difference between: /* This is first line of comments This is the second line And this will be the last line */ and: /...
1 year ago

java.lang.NoSuchMethodException Java

Java
I'm trying to call 2 different versions of the same dependency library (jars) within a top level Main class. So I created an interface with 2 implemen...
6 months ago

Java 8 and Java time

Java
I know the default Java library for Codename One is now Java 8 and I am also compiling locally with Java 8. I am trying to use the new java.time API...
9 months ago

Java BinarySearch

Java
Can I get some help please? I have tried many methods to get this to work i got the array sorted and to print but after that my binary search function...
1 year ago

Java - Factorial

Java
I am printing the factorial of the first 10 numbers, so it is 0 - 9. The below code works for me. But I am unable to make the loop such that the facto...
1 year ago