Trending questions in Java

0 votes
1 answer

Error: 'android.os.NetworkOnMainThreadException'?

Hello, I solved this problem using a new Thread. Thread ...READ MORE

May 28, 2020 in Java by Niroj
• 82,580 points
358 views
0 votes
1 answer

how to read csv file form sftp connection and store into string object in java code and convert into json.....post it using rest api

Hey, @Pooja, Before starting with anything you should ...READ MORE

May 12, 2020 in Java by Roshni
• 10,420 points
1,039 views
0 votes
1 answer

Can edureka has portals to teach ?

Hi, @Dhanush, Regarding your query, I would suggest you ...READ MORE

Jun 1, 2020 in Java by Gitika
• 65,870 points
81 views
0 votes
1 answer

How can one detect airplane mode on Android?

Hello, When registering the Airplane Mode BroadcastReceiver (@saxos answer) I ...READ MORE

May 26, 2020 in Java by Niroj
• 82,580 points
323 views
0 votes
1 answer

How to configure port for a Spring Boot application?

Hello @kartik, You can set port in java ...READ MORE

May 22, 2020 in Java by Niroj
• 82,580 points
501 views
0 votes
1 answer

Error:javax.net.ssl.SSLHandshakeException Error?

Hello @kartik, First, you need to obtain the ...READ MORE

May 21, 2020 in Java by Niroj
• 82,580 points
504 views
0 votes
1 answer

How to convert .imm imacro file to php/java to run on web hosting

Hello, You can try the sample code below: iimPlay("Test.iim") When ...READ MORE

May 13, 2020 in Java by Niroj
• 82,580 points
824 views
0 votes
1 answer

Error:Unable to execute dex: Multiple dex files define

Hello @kartik, The Solution for me was just ...READ MORE

May 25, 2020 in Java by Niroj
• 82,580 points
289 views
0 votes
1 answer

Error:Android SDK installation doesn't find JDK

Hii @kartik, It appears as if whoever posted ...READ MORE

May 25, 2020 in Java by Niroj
• 82,580 points
303 views
0 votes
1 answer

What is a serialVersionUID and why should we use it?

Hello @kartik, SerialVersionUID is a unique identifier for each ...READ MORE

May 28, 2020 in Java by Niroj
• 82,580 points
157 views
0 votes
1 answer

How to import android project as library and NOT compile it as apk?

Hello, In projLib's build.gradle file, you'll see a statement ...READ MORE

May 26, 2020 in Java by Niroj
• 82,580 points
166 views
0 votes
1 answer

How to include SQLite database in executable Jar?

Hello @kartik, I have found two different ways ...READ MORE

May 7, 2020 in Java by Niroj
• 82,580 points
927 views
+1 vote
10 answers

How to make mock to void methods with mockito

You can use partial mocking to serve ...READ MORE

Dec 7, 2018 in Java by nitesh
26,473 views
0 votes
1 answer

How to use proper use cases for Android UserManager.isUserAGoat()?

Hello @kartik, From their source, the method used to ...READ MORE

May 25, 2020 in Java by Niroj
• 82,580 points
112 views
0 votes
1 answer

How to make an Android device vibrate?

Hello @kartik, Try: import android.os.Vibrator; Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); // ...READ MORE

May 25, 2020 in Java by Niroj
• 82,580 points
91 views
0 votes
1 answer

Write a method

Hey, @MIH, You can follow this: public class ReverseNumber ...READ MORE

Jun 4, 2020 in Java by Gitika
• 65,870 points
125 views
0 votes
1 answer

How do I make a list with checkboxes in Java Swing?

Hii @kartik, Create a custom ListCellRenderer and asign it to ...READ MORE

May 7, 2020 in Java by Niroj
• 82,580 points
579 views
0 votes
1 answer

How to refresh data in ViewPager Fragment ?

Using the ViewPager.OnPageChangeListener is the correct way to go, ...READ MORE

Mar 6, 2019 in Java by developer_1
• 3,310 points
19,051 views
0 votes
0 answers

I cannot build and sync my gradle in androidstudio.

how to build and sync my gradle ...READ MORE

May 8, 2020 in Java by Edureka
• 120 points
435 views
0 votes
1 answer

How to Embed Gecko/WebKit in Java?

Hii, If SWT is an option, you can ...READ MORE

May 7, 2020 in Java by Niroj
• 82,580 points
420 views
0 votes
2 answers

Resolving PKIX path building failed Error?

You need to add the certificate for App2 to ...READ MORE

Sep 24, 2018 in Java by Sushmita
• 6,890 points
27,972 views
0 votes
1 answer

Reading data from excel , few cell values have double quotes. How to include the double quotes while reading

Hi, @Jyra, You can use one Java function ...READ MORE

May 7, 2020 in Java by Gitika
• 65,870 points
368 views
+3 votes
0 answers

How to Download the Certificate for completion?

How Can I download the the Course ...READ MORE

Apr 16, 2020 in Java by Ajaaypranav
• 150 points
981 views
0 votes
1 answer

How to get the windows native look in Java GUI programming?

Hello Kartik,  You can try the syntax: UIManager.setLookAndFeel(PLAF); (Pluggable ...READ MORE

May 7, 2020 in Java by Niroj
• 82,580 points
149 views
0 votes
1 answer

How to set JFrame to appear centered, regardless of monitor resolution?

Hello kartik, You can  always did it in ...READ MORE

May 7, 2020 in Java by Niroj
• 82,580 points
80 views
0 votes
2 answers

How to generate a class at runtime?

Yes, I recently met this library which ...READ MORE

Apr 15, 2020 in Java by Edureka
• 520 points
978 views
0 votes
0 answers

how to send a pdf file as a response to frontend?

when a user upload a file to ...READ MORE

Apr 11, 2020 in Java by Abhishek
• 120 points
1,154 views
0 votes
0 answers

Write a program that uses a while loop to read 10 integer numbers from file

Write a program that uses a while ...READ MORE

Apr 15, 2020 in Java by MIH
• 160 points
866 views
0 votes
0 answers

Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 63 path $.data

Here i am using retrofit post request:- RequestBody ...READ MORE

Apr 23, 2020 in Java by anonymous
• 120 points
452 views
0 votes
1 answer

How to automatically deploy a jar from s3 to aws lambda?

You could probably create a lambda function ...READ MORE

Apr 2, 2020 in Java by Jake
1,294 views
0 votes
1 answer

'javac' is not recognized as an internal or external command, operable program or batch file.

Hey @Paridhi, check this out https://www.edureka.co/community/4800/unable-resolve-error-recognized-internal-external-command This should solve ...READ MORE

Apr 19, 2020 in Java by Sirajul
• 58,990 points
534 views
0 votes
1 answer

How to set AUTO-SCROLLING of JTextArea in Java GUI?

Hii kartik, When you click anywhere over JTextArea, ...READ MORE

Apr 21, 2020 in Java by Niroj
• 82,580 points
377 views
0 votes
1 answer

What is definition of an invalid literal?

Hi, @ Stephen, I will explain to you ...READ MORE

Apr 20, 2020 in Java by Gitika
• 65,870 points
346 views
0 votes
1 answer

What Kind of Files IOC Container can Read other than XML directly or Indirectly?

Hi, @Ferry, The configuration metadata is nothing but bean ...READ MORE

Apr 23, 2020 in Java by Gitika
• 65,870 points
170 views
0 votes
1 answer

How to add tabs to JTabbedPane using WindowBuilder?

Hii, You can just find out by given ...READ MORE

Apr 21, 2020 in Java by Niroj
• 82,580 points
237 views
0 votes
1 answer

How to call setUndecorated() after a frame is made visible?

Hello kartik, You can Try: dispose(); setUndecorated(true); setVisible(true); Check it Out. Hope ...READ MORE

Apr 21, 2020 in Java by Niroj
• 82,580 points
220 views
0 votes
1 answer

How to open warning/information/error dialog in swing?

Hello, You can try out : import javax.swing.JFrame; import javax.swing.JOptionPane; public ...READ MORE

Apr 21, 2020 in Java by Niroj
• 82,580 points
173 views
0 votes
0 answers

How to manage two JRadioButtons in java so that only one of them can be selected at a time?

How to manage two JRadioButtons in java ...READ MORE

Apr 21, 2020 in Java by kartik
• 37,490 points
200 views
0 votes
1 answer

How can I set JFrame to appear centered, regardless of monitor resolution?

Hello @kartik, Use setLocationRelativeTo(null) This method has a special effect ...READ MORE

Apr 21, 2020 in Java by Niroj
• 82,580 points
159 views
0 votes
1 answer

How to implement draggable tab using Java Swing?

Hello kartik, setAcceptor(TabAcceptor a_acceptor) should let the consumer code ...READ MORE

Apr 21, 2020 in Java by Niroj
• 82,580 points
139 views
0 votes
1 answer

How to make JTable both AutoResize and horizontall scrollable?

Hello @kartik, If for some reason customising JTable ...READ MORE

Apr 21, 2020 in Java by Niroj
• 82,580 points
131 views
0 votes
1 answer

How could I implement autocompletion using Swing?

Hello, You can try out this: import java.awt.*; import java.awt.event.*; import ...READ MORE

Apr 21, 2020 in Java by Niroj
• 82,580 points
63 views
0 votes
0 answers

HOw can i do this?

The department of History has just bought ...READ MORE

Apr 15, 2020 in Java by MIH
• 160 points
115 views
0 votes
1 answer

How can we activate JMX on my JVM for access with jconsole?

Hello @kartik, Run your java application with the ...READ MORE

Apr 9, 2020 in Java by Niroj
• 82,580 points
259 views
0 votes
1 answer

GSON throwing “Expected BEGIN_OBJECT but was BEGIN_ARRAY”?

This will work: ChannelSearchEnum[] enums = gson.fromJson(yourJson, ChannelSearchEnum[].class); But ...READ MORE

Dec 26, 2018 in Java by Sushmita
• 6,890 points
20,505 views
0 votes
1 answer

Error:“java.lang.OutOfMemoryError: Java heap space” ?

Hii, Possible causes: Simple configuration issue, where the specified ...READ MORE

Apr 8, 2020 in Java by Niroj
• 82,580 points
220 views
0 votes
1 answer

How to run a Java program from the command line on Windows?

Hello @kartik, In case your Java class is ...READ MORE

Apr 9, 2020 in Java by Niroj
• 82,580 points
169 views
0 votes
1 answer

Error: Unable to run mksdcard SDK tool in java?

Hello, If you use  Ubuntu, you can try: sudo apt-get ...READ MORE

Apr 9, 2020 in Java by Niroj
• 82,580 points
122 views