Trending questions in Java

+9 votes
16 answers

Unable to resolve this error: "javac is not recognized as an internal or external command"

Check your javac path on Windows using Windows Explorer C:\Program Files\Java\jdk1.7.0_02\bin and ...READ MORE

May 23, 2018 in Java by Rishabh
• 3,620 points
463,804 views
+11 votes
13 answers

Default parameters of XMS and XMX in JVM

Run this code to see all the ...READ MORE

Nov 13, 2018 in Java by anonymous
402,625 views
+2 votes
2 answers

How to find all the classes of a package in Java?

Looking on internet I found this page with ...READ MORE

Nov 16, 2020 in Java by Juan
• 340 points
348,315 views
+5 votes
11 answers

How to import a jar file in Eclipse?

Click on File > Import. The Import ...READ MORE

Aug 23, 2018 in Java by Daisy
• 8,140 points
359,766 views
+17 votes
25 answers

How can I convert String to JSON object in Java?

Hi @Daisy You can use Google gson  for more ...READ MORE

Feb 7, 2019 in Java by Suresh
• 720 points
253,584 views
+2 votes
13 answers

How does java.net.SocketException: Connection reset happen ?

You can use wireshark to view the ...READ MORE

Dec 7, 2018 in Java by tushh
253,164 views
+3 votes
14 answers

“A Non-static method cannot be referenced from a static context” error

Hey Techies, Non-static variables are part of the objects ...READ MORE

Dec 10, 2020 in Java by Roshni
• 10,480 points
249,688 views
+3 votes
14 answers

Communications link failure: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException

Your exception seems to indicate that your ...READ MORE

Dec 11, 2020 in Java by Roshni
• 10,480 points
249,482 views
+3 votes
13 answers

Unable to execute jar- file: “no main manifest attribute”

add a jar/manifest/attributes setting like this: apply plugin: ...READ MORE

Nov 27, 2018 in Java by krishti
216,407 views
+1 vote
6 answers

How can I separate the digits of an int number in Java?

You can also have a look here: To ...READ MORE

Dec 9, 2020 in Java by Roshni
• 10,480 points
209,882 views
+1 vote
13 answers

What is the correct way to add external Jars to IntelliJ IDEA Project?

Adding custom JAR files to the EAR project Copy the custom JAR to the ...READ MORE

Dec 10, 2020 in Java by Nikita
187,493 views
+1 vote
1 answer

Error creating bean with name 'entityManagerFactory' defined in class path resource : Invocation of init method failed

To solve your ERROR, I would suggest ...READ MORE

Feb 18, 2022 in Java by Aditya
• 7,680 points
147,184 views
0 votes
4 answers

How can we display an output of float data with 2 decimal places in java? Please help

You can use DecimalFormat. One way to use ...READ MORE

Dec 16, 2020 in Java by Gitika
• 65,770 points
164,466 views
+1 vote
13 answers

How to send HTTP POST requests on Java?

With Apache HttpClient In the old days, this Apache ...READ MORE

Dec 10, 2020 in Java by Rajiv
• 8,870 points
159,386 views
+1 vote
5 answers

How to take input using BufferedReader in Java?

yupp i am explaining every thing .. We ...READ MORE

Feb 1, 2020 in Java by Rohan
• 180 points
123,704 views
+1 vote
12 answers

Iterate over a JSONObject?

Assuming your JSON object is saved in ...READ MORE

Dec 11, 2020 in Java by Rajiv
• 8,870 points
124,757 views
0 votes
6 answers

How can we define global variables in java?

To define Global Variable you can make ...READ MORE

Dec 15, 2020 in Java by Gitika
• 65,770 points
117,847 views
0 votes
12 answers

Java - sending HTTP parameters via POST method easily

Below are the steps we need to ...READ MORE

Dec 11, 2020 in Java by Rajiv
• 8,870 points
111,033 views
+1 vote
4 answers

How to take multiple integer input in one line using BufferedReader in Java?

To do this, we could read in ...READ MORE

Dec 14, 2020 in Java by Roshni
• 10,480 points
98,082 views
+4 votes
4 answers

Using while loop i want to print 10 even numbers

Hello @Nitesh, you are pretty much there. ...READ MORE

Nov 22, 2018 in Java by Priyaj
• 58,020 points
93,078 views
0 votes
0 answers

UnsatisfiedDependencyException: Error creating bean with name

 I'm trying to create a Spring CRUD ...READ MORE

May 21, 2022 in Java by Kichu
• 19,040 points
52,307 views
0 votes
4 answers

How do I check if a file exists in Java?

To test to see if a file ...READ MORE

Dec 29, 2020 in Java by Rajiv
• 8,870 points
66,355 views
0 votes
1 answer

How to set selected value of jQuery Select2?

The third parameter of the new Option ...READ MORE

May 30, 2022 in Java by gaurav
• 23,260 points
40,414 views
+5 votes
4 answers

How to execute a python file with few arguments in java?

You can use Java Runtime.exec() to run python script, ...READ MORE

Mar 27, 2018 in Java by DragonLord999
• 8,450 points

edited Nov 7, 2018 by Omkar 81,219 views
+1 vote
12 answers

Hibernate hbm2ddl.auto possible values and their uses

hibernate.hbm2ddl.auto (e.g. none (default value), create-only, drop, create, create-drop, validate, and update) Setting to perform SchemaManagementTool actions automatically as ...READ MORE

Dec 7, 2018 in Java by Shuvodip
77,006 views
0 votes
1 answer

How do I check if a string contains a substring in Java?

Hi@akhtar, The first and foremost way to check ...READ MORE

Dec 30, 2020 in Java by MD
• 95,460 points

edited Jul 5, 2023 by Khan Sarfaraz 56,658 views
+1 vote
7 answers

What is difference between access modifier and access specifier in java

Access Specifier:- This can be understood as ...READ MORE

Feb 14, 2019 in Java by Priyaj
• 58,020 points
70,863 views
0 votes
1 answer

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'demoRestController'

To answer your doubt, the DemoApplication class ...READ MORE

Feb 23, 2022 in Java by Aditya
• 7,680 points
36,717 views
+1 vote
4 answers

What is the difference between string object and string literal?

A String literal is a Java language concept. This ...READ MORE

Aug 16, 2019 in Java by Sirajul
• 59,230 points
67,431 views
0 votes
3 answers

HttpServletRequest get JSON POST data

Configure the action as given below: Method: Since ...READ MORE

Dec 16, 2020 in Java by Rajiv
• 8,870 points
68,586 views
0 votes
1 answer

Convert GMT to IST (India Standard Time) using javascript?

You can specify an IANA time zone ...READ MORE

Nov 7, 2022 in Java by Damonlang
• 700 points
20,373 views
0 votes
1 answer

what is the extension of compiled java classes?

The extension of compiled Java classes is ...READ MORE

Oct 17, 2023 in Java by anonymous
• 520 points
4,177 views
0 votes
0 answers

what is class component in react ?

Jan 12 in Java by Evanjalin
• 5,380 points
321 views
0 votes
1 answer

How to check java version in linux?

Checking your Java version on a Linux ...READ MORE

Nov 2, 2023 in Java by anonymous
2,639 views
0 votes
0 answers

How to iterate arraylist in java?

How does one perform iteration over an ...READ MORE

Dec 19, 2023 in Java by Saniya
• 3,360 points
468 views
0 votes
0 answers

How to capitalize first letter in java?

How can one implement the capitalization of ...READ MORE

Dec 19, 2023 in Java by Saniya
• 3,360 points
418 views
0 votes
1 answer

How to convert decimal to binary in java?

In Java, you can convert a decimal ...READ MORE

Dec 13, 2023 in Java by John
520 views
0 votes
1 answer

What is truncation in Java?

In Java, truncation refers to the process ...READ MORE

Nov 2, 2023 in Java by anonymous
• 3,360 points
2,082 views
0 votes
1 answer

How to reverse a string in java word by word?

Here is the code to reverse a ...READ MORE

Dec 13, 2023 in Java by Anu
434 views
0 votes
0 answers

why so JavaScript and java have similar name

Nov 29, 2023 in Java by Priyanka
• 4,060 points
707 views
0 votes
1 answer

What is dynamic method dispatch in Java?

Dynamic Method Dispatch is a fundamental concept ...READ MORE

Nov 29, 2023 in Java by anonymous
• 3,360 points
672 views
0 votes
0 answers

how to sort 2d array in java ?

Nov 29, 2023 in Java by Evanjalin
• 5,380 points
480 views
0 votes
1 answer

Why Java is not pure object oriented?

Java is often described as not being ...READ MORE

Nov 29, 2023 in Java by anonymous
• 3,360 points
488 views
0 votes
1 answer

Why java is called platform independent?

Java is often referred to as a ...READ MORE

Nov 29, 2023 in Java by anonymous
• 3,360 points
415 views
0 votes
0 answers

how to compile java code in command prompt

how to compile java code in command ...READ MORE

Nov 29, 2023 in Java by Priyanka
• 4,060 points
371 views
0 votes
1 answer

What is the default priority of a thread in java?

By default, in Java, when a thread ...READ MORE

Nov 29, 2023 in Java by Zoya
426 views
0 votes
1 answer

How much time it takes to learn Java?

Learning Java, like any programming language, can ...READ MORE

Nov 29, 2023 in Java by anonymous
• 3,360 points
369 views
0 votes
1 answer

What is the extension of java code files?

Java source code files often have the ...READ MORE

Oct 11, 2023 in Java by anonymous
• 3,360 points
2,344 views
0 votes
1 answer

how to get ascii value of char in java

In Java, you can get the ASCII ...READ MORE

Nov 24, 2023 in Java by Zoya
392 views
0 votes
2 answers

What is the most important feature of java?

The most important feature of Java is ...READ MORE

Nov 29, 2023 in Java by anonymous
• 3,360 points
434 views