Java Multiple comparision in java

Java
Pardon me if this is a stupid question.. I was wondering if there is any support for following comparison in Java: (a, b, c .... != null) in place f...
3 years ago

Java starting another Java Application

Java
I am in the process of building a wrapper jar for a jar that I built. It will handle updating the main application and making sure users are valid use...
2 years ago

Arrays in Java - Core Java

Java
In This Question A value is "everywhere" in an array if for every pair of adjacent elements in the array, at least one of the pair is that value. Retu...
2 years ago

java java.lang.outofmemoryerror: java heap space

Java
Okay so im programming a game for my A-Level computing project, and so far everything has gone okay. I finished the framework, and started implementin...
3 years ago

Is it possible to use Java 8 for Android development?

Java
Searching the web, it is not clear if Java 8 is supported for Android development or not. Before I download/setup Java 8, can some one point me at an...
3 years ago

What is the difference between a local variable, an instance field, an input parameter, and a class field?

Java
What is the difference between a local variable, an instance field, an input parameter, and a class field?
3 years ago

java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.app.Activity.findViewById(int)' on a null object reference

Java
i alway get an Error in my Android Project. java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.app.Activity....
3 years ago

print specific record from Hashmap

Java
I have a Hashmap and i am struggling on how to print a single key and value. i am able to print all of them but would like to know how to just print o...
3 years ago

Android: Sending data >20 bytes by BLE

Java
I am able to send data upto 20 bytes by connecting to an external BLE device. How do I send data greater than 20 bytes. I have read that we have to ei...
3 years ago

Read all files in a folder

Java
I want to read all the files in a folder through Java. Can anyone help me?
3 years ago

IntelliJ how do I generate a new class?

Java
When I go to my project structure and right click -> new, I only see new file/folder etc... but no class generation or packages. How do I get IntelliJ...
3 years ago

How to play a background music when the program run? in java

Java
I am making a card game, and it's almost done. The last thing I want to do is play some background music. Now if I copy the file into the default pack...
3 years ago

Removing an Object from an Array of Objects in Java

Java
I am currently working on a school project where we are learning to use Arrays of Objects. I have come across two separate issues along the way which ...
3 years ago

Java readline() skipping second line

Java
I have a questions file that I'd like to read, and when its reading, I want it to Identify the questions from the answers and print them, before each ...
3 years ago

Get last element of Stream/List in a one-liner

Java
How can I get the last element of a stream or list in the following code? Where data.careas is a List<CArea>: CArea first = data.careas.stream...
3 years ago

( Android ) Webview refresh button

Java
I'm trying to create a button to reload a Webview but ( sorry I'm new in android developement ) I didn't find a way to do it ( even in stackoverflow )...
3 years ago

rest/javax/jersey/grizzly: is it mandatory to return OK (200) response code for POST requests?

Java
Imagine a post REST end point such as: @POST @Path("/cbo/{param1}/{param2}") public Response updateCbo() { //do something return Response.sta...
3 years ago

Hibernate - cant use GROUP BY With ORDER BY together

Java
This one is odd... I have an hql query that ignore the GOUP BY if ORDER BY is included. it will perform the query without the group by, but if I remo...
3 years ago

Java code related to equals method

Java
I am practicing for an exam, and found a sample problem that I don't understand. For the following code, find what the output is: public class Tes...
3 years ago

Maven/Sprint/Hibernate NoSuchMethodError: org.hibernate.engine.jdbc.spi.JdbcServices.getConnectionProvider()

Java
First, I don't usually work with Java, but have in the past, so I'm a little bit out of my comfort zone. I have a Spring and Hibernate project that I'...
3 years ago