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
124,102 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
87,648 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
68,965 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
58,095 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,013 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
27,832 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
27,593 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 23,459 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
23,588 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
22,790 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,340 views
0 votes
0 answers

pass datasource for job to AWS Glue client in JAVA

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

3 days ago in Java by cheshta
• 120 points
4 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
98 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,900 points
9,723 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
93 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
79 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
67 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
68 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
47 views
0 votes
0 answers

why the should be final

Sep 17 in Java by anonymous
42 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
52 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
48 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
108 views
0 votes
1 answer

How to connect Java to MySql Database?

This will work: try { ...READ MORE

Aug 27 in Java by John
60 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
39 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
37 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
37 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
34 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
33 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
31 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
31 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
30 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
• 36,220 points
3,675 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
• 36,220 points
784 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
214 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
• 36,220 points
157 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 61 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,510 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
417 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
• 36,220 points
117 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
• 36,220 points
73 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
• 36,220 points
84 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
54 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 355 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,326 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
182 views
0 votes
1 answer

How can I change my string into date directly?

Hi Priya, You check this code, import java.util.Date; import java.text.DateFormat; import ...READ MORE

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

How to pass dynamic JSON request with parameter in POST request using Rest assured java?

I am currently testing an API which ...READ MORE

Jun 25 in Java by avishek
• 120 points
1,694 views