Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
Can you write a Java class that could be used both as an applet as well as an application?
Home
JAVA
Can you write a Java class that could be used both as an applet as well as an application?
+2
votes
asked
May 12, 2021
in
JAVA
by
rajeshsharma
Can you write a Java class that could be used both as an applet as well as an application?
java-class
java-application
java
Java-questions-answers
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
May 12, 2021
by
rajeshsharma
Yes. Add a main() method to the applet.
Related questions
0
votes
Q: Out of these classes, which one is used for reading strings and characters in Java from the console?
asked
Aug 21, 2022
in
JAVA
by
sharadyadav1986
java-class
java
0
votes
Q: How to make a read-only class in Java?
asked
May 2, 2021
in
JAVA
by
sharadyadav1986
#read-only-class
java-class
Java-questions-answers
0
votes
Q: Select the best from following given statement is completely true?
asked
Jan 24, 2021
in
JAVA
by
rajeshsharma
object-oriented-programming
java-class
Java-questions-answers
+2
votes
Q: How can we create an immutable class in Java?
asked
May 4, 2021
in
JAVA
by
SakshiSharma
#immutable-class
java
Java-questions-answers
0
votes
Q: Among the following given options, which can be considered as a member of a class?
asked
Jan 24, 2021
in
JAVA
by
rajeshsharma
#member
class
java
member-class
Java-questions-answers
+3
votes
Q: Write a Java program that prints all the values given at command-line.
asked
May 12, 2021
in
JAVA
by
rajeshsharma
java-program
java
command-line
Java-questions-answers
+2
votes
Q: How can you make a class serializable in Java?
asked
May 6, 2021
in
JAVA
by
SakshiSharma
#serialization
java
Java-questions-answers
0
votes
Q: What is an Java Applet?
asked
Jul 2, 2023
in
JAVA
by
rajeshsharma
java
applet
0
votes
Q: What are the types of inner classes (non-static nested class) used in Java?
asked
May 5, 2021
in
JAVA
by
SakshiSharma
#inner-class
java
Java-questions-answers
0
votes
Q: Which method of the Class.class is used to determine the name of a class represented by the class object as a String?
asked
Apr 8, 2021
in
JAVA
by
SakshiSharma
java
java-questions-and-answers
java-mcq
core-java-mcq
java-multiple-choice-questions
java-questions-2021
java-interview-questions
java-advanced-questions
Java-questions-answers
...