Trending questions in Java

+8 votes
11 answers

Default parameters of XMS and XMX in JVM

You use these Java command-line parameters to ...READ MORE

Nov 13, 2018 in Java by Murali
126,157 views
+15 votes
18 answers

How can I convert String to JSON object in Java?

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

Feb 7 in Java by Suresh
• 700 points
88,976 views
+2 votes
10 answers

How to import a jar file in Eclipse?

To import jar file in your Eclipse ...READ MORE

May 15, 2018 in Java by sharth
• 3,350 points
70,701 views
+2 votes
12 answers

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

this method must be static so that it will exist even though the ...READ MORE

Jun 11 in Java by Neha
• 330 points
59,284 views
+9 votes
11 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,540 points
43,971 views
+1 vote
11 answers

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

you mysql server instance is not running ...READ MORE

Jun 15 in Java by Encrypter Manyange
28,565 views
+2 votes
10 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
28,268 views
+1 vote
11 answers

How to send HTTP POST requests on Java?

How to invoke Thread dump analysis API? Invoking ...READ MORE

Jun 16 in Java by Jim
• 810 points

reshown Jun 17 by Vardhan 24,080 views
0 votes
10 answers

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

The best way is to add the ...READ MORE

Dec 10, 2018 in Java by Nabarupa
24,156 views
+1 vote
10 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
23,548 views
+1 vote
10 answers

Iterate over a JSONObject?

You can use the following method to ...READ MORE

Dec 7, 2018 in Java by Shuvodip
18,848 views
0 votes
0 answers

java regex split string into double numbers and-letters

I am having a problem splitting something ...READ MORE

4 days ago in Java by khs
• 120 points
17 views
0 votes
0 answers

pass datasource for job to AWS Glue client in JAVA

How can i mention datasource for AWS ...READ MORE

Nov 9 in Java by cheshta
• 120 points
17 views
0 votes
1 answer

How to find the nth prime number in Java?

Here is the code to find nth ...READ MORE

Mar 4 in Java by Priyaj
• 56,920 points
9,982 views
+1 vote
0 answers

output occurs but invisible immediately how to rectify this ?

public class evenodd { public static void main(String[] ...READ MORE

Oct 17 in Java by BIPLAB
• 130 points
110 views
0 votes
1 answer

Java and MySql: Check if database exists

You can get the list of databases ...READ MORE

Sep 30 in Java by Tina
103 views
0 votes
1 answer

How to connect Java to MySql Database?

Make sure you have the MySQL jdbc ...READ MORE

Sep 30 in Java by Shyam
83 views
0 votes
1 answer

Java and MySql: Delete database if exists

First, you have to check if the ...READ MORE

Sep 30 in Java by Kiran
79 views
0 votes
1 answer

How to create database in MySql using Java?

First, you will have to create connection ...READ MORE

Sep 30 in Java by Shri
75 views
0 votes
1 answer

How can I solve this example in an easy way??

You can use this code: import java.util.*; public class ...READ MORE

Sep 23 in Java by Omkar
• 67,660 points
49 views
0 votes
0 answers

why the should be final

Sep 17 in Java by anonymous
44 views
0 votes
1 answer

What is the difference between main(String[] args) and main(String... args) in Java?

String[] is used to accept a single parameter ...READ MORE

Sep 6 in Java by Piya
56 views
+1 vote
1 answer

Adding Jar file to project

Changing the JRE System Library might work.  Right-click ...READ MORE

Sep 4 in Java by Esha
53 views
+1 vote
2 answers

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

Try this in case you don't know ...READ MORE

Aug 29 in Java by Sirajul
• 37,930 points
3,837 views
0 votes
1 answer

Java and MySql: Check if database exists

You can get the list of databases ...READ MORE

Aug 27 in Java by Kunal
126 views
0 votes
1 answer

HttpServletRequest get JSON POST data

Normally you can GET and POST parameters ...READ MORE

Nov 29, 2018 in Java by Sushmita
• 6,880 points
11,813 views
+2 votes
1 answer

Javac command not working in my windows 10

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

Aug 6 in Java by Sirajul
• 37,930 points
918 views
0 votes
1 answer

How to connect Java to MySql Database?

This will work: try { ...READ MORE

Aug 27 in Java by John
63 views
0 votes
1 answer

Java and MySql: Delete database if exists

First, you have to check if the ...READ MORE

Aug 27 in Java by Varun
43 views
0 votes
1 answer

How to create database in MySql using Java?

First, you will have to create connection ...READ MORE

Aug 27 in Java by Juni
41 views
0 votes
1 answer

How to get text from text box in Swing?

You can add a Button listener here. ...READ MORE

Aug 27 in Java by Jishan
40 views
0 votes
1 answer

How to create password field in Swing?

Swing provides an object called JPasswordField for ...READ MORE

Aug 27 in Java by Bruce
36 views
0 votes
1 answer

How to create text labels in Swing, Java?

In the frame, you can use the ...READ MORE

Aug 27 in Java by Jimmy
35 views
0 votes
1 answer

Handling empty input in swing text box

login_but.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e){ //System.out.print(F_user.getText()); String username ...READ MORE

Aug 27 in Java by Nila
34 views
0 votes
1 answer

Create Buttons in Java Swing

First, you will have to create a ...READ MORE

Aug 27 in Java by Esha
33 views
0 votes
1 answer

Swing Java create Text Box

In the frame, you can use the ...READ MORE

Aug 27 in Java by Kyle
31 views
0 votes
1 answer

How to Convert .msg (outlook mail) to pdf using java

Hi @Basha! Here's a code to help you ...READ MORE

Aug 21 in Java by Kishan
247 views
+1 vote
1 answer

Java: Nested Methods

JAVA does not support “directly” nested methods, but you ...READ MORE

Aug 20 in Java by Sirajul
• 37,930 points
190 views
0 votes
1 answer
0 votes
0 answers

How to run python script in java [closed]

Aug 22 in Java by anonymous

closed Aug 22 by Omkar 66 views
0 votes
10 answers

Java - sending HTTP parameters via POST method easily

I personally use Apache's HTTPClient/HttpCore libraries to do ...READ MORE

Dec 10, 2018 in Java by robocop
14,670 views
0 votes
1 answer

How to add items in list at a time?

Hi Priyanka , I think this code snippet ...READ MORE

Aug 9 in Java by sampriti
• 1,100 points
447 views
0 votes
2 answers

Can you give me the proper difference between java.util.Date vs java.sql.Date ?

The java.util.date class represents a particular moment in time, with ...READ MORE

Aug 27 in Java by Sirajul
• 37,930 points
128 views
0 votes
2 answers

How do I get distinct element from list in java?

You should use a Set. it doesn't contain duplicates. If ...READ MORE

Aug 23 in Java by Sirajul
• 37,930 points
83 views
0 votes
2 answers

Please explain me the difference between scanner and the buffer reader?

As per your question for reading a ...READ MORE

Aug 27 in Java by Sirajul
• 37,930 points
99 views
0 votes
1 answer

how to compare two words in java?

hey,  I think in your code the function ...READ MORE

Aug 7 in Java by sampriti
• 1,100 points

edited Aug 8 by Kalgi 380 views
0 votes
1 answer

Can you explain what is the difference between hashtable and hashmap?

Hi, Hashtable is synchronized, whereas HashMap is not. This makes HashMap better for ...READ MORE

Aug 14 in Java by anonymous
56 views
+2 votes
0 answers

How to add external Jar in modular JavaFX 11 project correctly?

I'm using Java 11 and JavaFX 11. ...READ MORE

Aug 8 in Java by invzbl3
207 views