Latest questions in Java

0 votes
0 answers

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 exception

I am getting the error java.lang.IndexOutOfBoundsException: Index: ...READ MORE

May 17, 2022 in Java by Kichu
• 19,050 points
2,123 views
0 votes
0 answers

java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

This is the exception on getConnection(): java.sql.SQLException: Access denied ...READ MORE

May 16, 2022 in Java by Kichu
• 19,050 points
6,553 views
0 votes
0 answers

resource : Invocation of init method failed

I am getting this error when I ...READ MORE

May 16, 2022 in Java by Kichu
• 19,050 points
2,802 views
0 votes
0 answers

Can I override and overload static methods in Java?

My questions are: Why can't static methods be ...READ MORE

May 15, 2022 in Java by Kichu
• 19,050 points
238 views
0 votes
0 answers

Error java.lang.OutOfMemoryError: GC overhead limit exceeded

When I execute my JUnit tests I am getting ...READ MORE

May 15, 2022 in Java by Kichu
• 19,050 points
360 views
0 votes
0 answers

What is "String args[]"? parameter in main method Java

I am a beginner in java and ...READ MORE

May 15, 2022 in Java by Kichu
• 19,050 points
308 views
0 votes
0 answers

java.lang.NumberFormatException: null i

I am getting this error while doing ...READ MORE

May 13, 2022 in Java by Kichu
• 19,050 points
1,588 views
0 votes
0 answers

Error occurred during initialization of boot layer FindException: Module not found

I executed this command line: java --module-path bin ...READ MORE

May 13, 2022 in Java by Kichu
• 19,050 points
1,551 views
0 votes
0 answers

Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]

I want to configure hibernate ORM mapping ...READ MORE

May 11, 2022 in Java by Kichu
• 19,050 points
17,122 views
0 votes
0 answers

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'MyController':

I am trying to create a spring ...READ MORE

May 9, 2022 in Java by Kichu
• 19,050 points
8,354 views
0 votes
0 answers

Int division: Why is the result of 1/3 == 0?

I ran this code and got the result ...READ MORE

May 9, 2022 in Java by Kichu
• 19,050 points
251 views
0 votes
0 answers

Can an outer class access the members of inner class?

If the inner class is defined as ...READ MORE

May 9, 2022 in Java by Kichu
• 19,050 points
210 views
0 votes
0 answers

java.net.SocketException: Connection reset

I was having an error when I ...READ MORE

May 8, 2022 in Java by Kichu
• 19,050 points
725 views
0 votes
0 answers

Spring Maven clean error - The requested profile "pom.xml" could not be activated because it does not exist

I am  getting this message when I ...READ MORE

May 8, 2022 in Java by Kichu
• 19,050 points
6,968 views
0 votes
0 answers

Eclipse "Error: Could not find or load main class"

I have a project on my laptop ...READ MORE

May 7, 2022 in Java by narikkadan
• 63,420 points
1,646 views
0 votes
0 answers

java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

I am getting this exception when I ...READ MORE

May 7, 2022 in Java by narikkadan
• 63,420 points
2,066 views
0 votes
0 answers

Exception in thread "main" java.lang.Error: Unresolved compilation problems

I am facing issues importing classes and ...READ MORE

May 7, 2022 in Java by narikkadan
• 63,420 points
4,831 views
0 votes
0 answers

Is hiding implementation detail Encapsulation or Abstraction?

I have seen some people defining abstraction ...READ MORE

May 6, 2022 in Java by narikkadan
• 63,420 points
2,451 views
0 votes
0 answers

How to round up integer division and have int result in Java?

I am working on a code to ...READ MORE

May 5, 2022 in Java by Kichu
• 19,050 points
1,880 views
0 votes
0 answers

CreateProcess error=2, The system cannot find the file specified

I have written a java program to ...READ MORE

May 5, 2022 in Java by Kichu
• 19,050 points
5,851 views
0 votes
0 answers

Javamail Could not convert socket to TLS GMail

I want to send an email using ...READ MORE

May 2, 2022 in Java by Kichu
• 19,050 points
2,579 views
0 votes
1 answer

testingtesttest

This category is home to all kinds ...READ MORE

Apr 26, 2022 in Java by anonymous
• 300 points
226 views
0 votes
0 answers

What are the differences between a HashMap and a Hashtable in Java?

What are the differences between a HashMap and a Hashtable in ...READ MORE

Apr 26, 2022 in Java by Rahul
• 3,380 points
244 views
0 votes
0 answers

What is the default access specifier in Java?

I just started reading a Java book ...READ MORE

Apr 26, 2022 in Java by Rahul
• 3,380 points
237 views
0 votes
0 answers

When to use LinkedList over ArrayList in Java?

I've always been one to simply use: List<String> ...READ MORE

Apr 26, 2022 in Java by Rahul
• 3,380 points
259 views
0 votes
0 answers

Why is there no multiple inheritance in Java, but implementing multiple interfaces is allowed?

Java doesn't allow multiple inheritance, but it ...READ MORE

Apr 26, 2022 in Java by Rahul
• 3,380 points
208 views
0 votes
0 answers

What is a NullPointerException, and how do I fix it?

What are Null Pointer Exceptions (java.lang.NullPointerException) and ...READ MORE

Apr 26, 2022 in Java by Rahul
• 3,380 points
325 views
0 votes
0 answers

How do you use the ? : (conditional) operator in JavaScript?

In simple words, what is the ?: ...READ MORE

Apr 26, 2022 in Java by Rahul
• 3,380 points
224 views
0 votes
0 answers

Convert integer to string

Given a number: int number = 1234; Which would ...READ MORE

Apr 26, 2022 in Java by Rahul
• 3,380 points
265 views
0 votes
0 answers

window.location.href and window.open () methods in JavaScript

What is the difference between window.location.href and ...READ MORE

Apr 26, 2022 in Java by Rahul
• 3,380 points
424 views
0 votes
0 answers

Comparing java.utilDate with LocalDate in java

I have a method wherein have to ...READ MORE

Apr 21, 2022 in Java by Rahul
• 3,380 points
352 views
0 votes
0 answers

How to split a string in Java

I have a string, "004-034556", that I want ...READ MORE

Apr 21, 2022 in Java by Rahul
• 3,380 points
364 views
0 votes
0 answers

Reversing an Array in Java [duplicate]

If I have an array like this: 1 ...READ MORE

Apr 21, 2022 in Java by Rahul
• 3,380 points
255 views
0 votes
0 answers

The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path [duplicate]

I have a project created by Maven ...READ MORE

Apr 21, 2022 in Java by Rahul
• 3,380 points
1,337 views
0 votes
0 answers

How do I "decompile" Java class files? [closed]

What program can I use to decompile ...READ MORE

Apr 21, 2022 in Java by Rahul
• 3,380 points
379 views
0 votes
0 answers

Java 11 JDK for Windows 7 32-bit system

I wanted to install Java 11 on ...READ MORE

Apr 21, 2022 in Java by Rahul
• 3,380 points
3,723 views
0 votes
0 answers

How to decode jwt token in javascript without using a library?

How can I decode the payload of ...READ MORE

Apr 21, 2022 in Java by Rahul
• 3,380 points
1,277 views
0 votes
0 answers

Java inner class and static nested class

What is the main difference between an ...READ MORE

Apr 21, 2022 in Java by Rahul
• 3,380 points
219 views
0 votes
0 answers

For-each over an array in JavaScript

How can I loop through all the ...READ MORE

Apr 19, 2022 in Java by Rahul
• 3,380 points
306 views
0 votes
0 answers

Simplest and understandable example of volatile keyword in Java

I'm reading about volatile keyword in Java and completely ...READ MORE

Apr 19, 2022 in Java by Rahul
• 3,380 points
187 views
0 votes
0 answers

What is a JavaBean exactly?

I understood, I think, that a "Bean" ...READ MORE

Apr 19, 2022 in Java by Rahul
• 3,380 points
212 views
0 votes
0 answers

How does the Java 'for each' loop work?

Consider: List<String> someList = new ArrayList<String>(); // add "monkey", ...READ MORE

Apr 19, 2022 in Java by Rahul
• 3,380 points
210 views
0 votes
0 answers

Data access object (DAO) in Java

I was going through a document and ...READ MORE

Apr 19, 2022 in Java by Rahul
• 3,380 points
469 views
0 votes
0 answers

How to set XML Attribute inside XML Element in Java Pojo Class - JAVX

How can I get this Output Response? <Response> ...READ MORE

Apr 19, 2022 in Java by Rahul
• 3,380 points
2,607 views
0 votes
1 answer

How do I declare and initialize an array in Java?

To declare and initialize an array in ...READ MORE

Jun 22, 2023 in Java by Khan Sarfaraz
• 700 points
238 views
0 votes
0 answers

public static void main(String arg[ ] ) in java is it fixed?

I was recently asked in an exam ...READ MORE

Apr 19, 2022 in Java by Rahul
• 3,380 points
580 views
0 votes
0 answers

Change date format in a Java string

I've a String representing a date. String date_s = "2011-01-18 ...READ MORE

Apr 14, 2022 in Java by Rahul
• 3,380 points
237 views
0 votes
0 answers

How to make a new List in Java

We create a Set as: Set myset = new HashSet() How ...READ MORE

Apr 14, 2022 in Java by Rahul
• 3,380 points
231 views
0 votes
0 answers

What does "javascript:void(0)" mean?

<a href="javascript:void(0)" id="loginlink">login</a> I've seen such hrefs many ...READ MORE

Apr 14, 2022 in Java by Rahul
• 3,380 points
205 views
0 votes
0 answers

Reverse a string in Java

I have "Hello World" kept in a ...READ MORE

Apr 14, 2022 in Java by Rahul
• 3,380 points
215 views