Trending questions in Java

0 votes
1 answer

How to directly initialize a HashMap?

Hello @Kartik, In plain java 8 you also ...READ MORE

Jul 28, 2020 in Java by Niroj
• 82,840 points
1,370 views
0 votes
1 answer

GSON fails to read/map a field with name like USERId

Hello @ RamaKrishnaRaju, You should note the Javadoc of configureMessageConverters states ...READ MORE

Jul 2, 2020 in Java by Niroj
• 82,840 points
2,474 views
0 votes
1 answer

How can I get the current stack trace in Java?

Hello @kartik, Try this: Thread.currentThread().getStackTrace(); is fine if you don't ...READ MORE

Jul 28, 2020 in Java by Niroj
• 82,840 points
1,296 views
0 votes
1 answer

What is the equivalent to a JavaScript setInterval/setTimeout in Android/Java?

Hii @kartik, As always with Android there's lots ...READ MORE

May 26, 2020 in Java by Niroj
• 82,840 points
3,990 views
0 votes
1 answer

Get sub-string from text based on certain conditions/rules

Hello @laiman, You can use IsMatch function that tests whether ...READ MORE

Jul 28, 2020 in Java by Niroj
• 82,840 points
1,351 views
0 votes
1 answer

How to include SQLite database in executable Jar?

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

May 8, 2020 in Java by Niroj
• 82,840 points
4,573 views
+1 vote
1 answer

if i given invalid data how to get alert in selenium using java

Hello, Here is some of the method you ...READ MORE

Jul 20, 2020 in Java by Niroj
• 82,840 points
1,351 views
0 votes
1 answer

How to create a memory leak in Java?

Hello @kartik, A simple thing to do is ...READ MORE

Jul 28, 2020 in Java by Niroj
• 82,840 points
965 views
+2 votes
2 answers

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

 java.sql.Date is a thin wrapper around millisecond value ...READ MORE

Aug 2, 2019 in Java by sampriti
• 1,120 points
15,864 views
0 votes
1 answer

How to install Maven artifact with sources from command line?

Hello @kartik, To download sources for your dependencies: mvn ...READ MORE

Jun 3, 2020 in Java by Niroj
• 82,840 points
3,244 views
0 votes
0 answers

Provider class org.springframework.context.index.processor.CandidateComponentsIndexer not in module

package spring.demo; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; public class Client { public ...READ MORE

Jul 4, 2020 in Java by DUGASANI
• 120 points
1,953 views
0 votes
1 answer

How to avoid Java code in JSP files?

Hello @kartik, JSTL offers tags for conditionals, loops, sets, ...READ MORE

Jul 28, 2020 in Java by Niroj
• 82,840 points
785 views
0 votes
2 answers

How can I address the unchecked cast warnings?

@SuppressWarnings("unchecked") READ MORE

Mar 21, 2019 in Java by anonymous
25,859 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 13, 2020 in Java by Roshni
• 10,480 points
3,992 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,840 points
3,135 views
0 votes
1 answer

How can you catch an exception thrown by another thread in Java?

This can be done using Thread.UncaughtExceptionHandler. Here’s a simple ...READ MORE

Dec 3, 2018 in Java by Frankie
• 9,830 points
26,083 views
0 votes
1 answer

Why Java String class is declared as final?

String is having a special features. where ...READ MORE

Jul 26, 2021 in Java by Ashok kumar

edited Mar 5 7,151 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
4,814 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,840 points
2,981 views
0 votes
1 answer

Error:“java.lang.OutOfMemoryError: PermGen space” in Maven build

Hello @kartik, When you increased MAVEN_OPTS, you increase the MaxPermSize, ...READ MORE

Jun 3, 2020 in Java by Niroj
• 82,840 points
1,952 views
0 votes
2 answers

What is the difference between getAttribute() and getParameter() in java?

getParameter() returns http request parameters. Those passed from ...READ MORE

Aug 28, 2019 in Java by Sirajul
• 59,230 points
23,076 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,770 points
2,977 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,840 points
2,083 views
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,840 points
1,850 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,840 points
2,120 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,840 points
1,884 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,840 points
1,838 views
0 votes
2 answers

Does the finally block always execute in Java?

If there is System.exit() present in the ...READ MORE

May 28, 2022 in Java by Abhishek

edited Mar 5 2,224 views
0 votes
2 answers

How do I replace character from string at specific indexes?

You could turn the String into a ...READ MORE

Aug 22, 2019 in Java by Sirajul
• 59,230 points
24,222 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
3,758 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 8, 2020 in Java by Niroj
• 82,840 points
2,557 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,840 points
1,577 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 24, 2020 in Java by anonymous
• 120 points
2,878 views
0 votes
3 answers

Change date format in a Java string

The reason for the inaccuracy is because ...READ MORE

Feb 9, 2022 in Java by Soham
• 9,710 points
3,697 views
0 votes
1 answer

How to Embed Gecko/WebKit in Java?

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

May 8, 2020 in Java by Niroj
• 82,840 points
2,149 views
0 votes
1 answer

How do I configure Maven for offline development?

Hello @kartik, You have two options for this: 1.) ...READ MORE

Jun 3, 2020 in Java by Niroj
• 82,840 points
881 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,840 points
2,618 views
0 votes
1 answer

Can edureka has portals to teach ?

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

Jun 2, 2020 in Java by Gitika
• 65,770 points
837 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,770 points
2,607 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,840 points
1,087 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,840 points
2,241 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,840 points
723 views
–1 vote
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 16, 2020 in Java by MIH
• 150 points
2,392 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
1,357 views
0 votes
1 answer

Write a method

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

Jun 5, 2020 in Java by Gitika
• 65,770 points
771 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,840 points
1,966 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,840 points
1,234 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 20, 2020 in Java by Sirajul
• 59,230 points
2,048 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,840 points
1,750 views