
Core Java
Quiz
•
Computers
•
University
•
Easy

Rashmi Prabha
Used 4+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 2 pts
1) Which statement is true about Java?
a) Java is a sequence-dependent programming language
b) Java is a code dependent programming language
c) Java is a platform-dependent programming language
d) Java is a platform-independent programming language
Answer explanation
Explanation: Java is called ‘Platform Independent Language’ as it primarily works on the principle of ‘compile once, run everywhere’.
2.
MULTIPLE CHOICE QUESTION
2 mins • 2 pts
2) Which one of the following is not a Java feature?
a) Object-oriented
b) Use of pointers
c) Portable
d) Dynamic and Extensible
Answer explanation
Explanation: Pointers is not a Java feature. Java provides an efficient abstraction layer for developing without using a pointer in Java. Features of Java Programming are Portable, Architectural Neutral, Object-Oriented, Robust, Secure, Dynamic and Extensible, etc.
3.
MULTIPLE CHOICE QUESTION
2 mins • 2 pts
3) Which environment variable is used to set the java path?
a) MAVEN_Path
b) JavaPATH
c) JAVA
d) JAVA_HOME
Answer explanation
Explanation: JAVA_HOME is used to store a path to the java installation.
4.
MULTIPLE CHOICE QUESTION
3 mins • 2 pts
4) What will be the output of the following Java code?
class box
{
int width;
int height;
int length;
}
class main
{
public static void main(String args[])
{
box obj = new box();
obj.width = 10;
obj.height = 2;
obj.length = 10;
int y = obj.width obj.height obj.length;
System.out.print(y);
}
}
a) 100
b) 400
c) 200
d) 12
5.
MULTIPLE CHOICE QUESTION
2 mins • 2 pts
5) Multiline comment is created using ___.
a) //
b) /* */
c) <!-- -- >
d) None of these
6.
MULTIPLE CHOICE QUESTION
2 mins • 2 pts
6) Which of the following is the correct syntax to create a variable in Java?
a) var name;
b) int name;
c) var name int;
d) All of these
7.
MULTIPLE CHOICE QUESTION
2 mins • 2 pts
7) What will be the output of following Java code?
public class Main {
public static void main(String[] args) {
String str = "Hello";
str = "Bye";
System.out.println(str);
}
}
a) Hello
b) Bye
c) Error
d) All of these
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple

Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
10 questions
MPB Week 6
Quiz
•
University
12 questions
Class Introduction
Quiz
•
University
10 questions
Social Media Communication Quiz
Quiz
•
University
11 questions
Tutorium 1 - Prog2
Quiz
•
University
14 questions
MS Excel For SF
Quiz
•
University
10 questions
Week 1 Recap
Quiz
•
University
10 questions
computer Networks
Quiz
•
University
11 questions
CIS2303 Week 1_2 CLO1
Quiz
•
University
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
Discover more resources for Computers
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms
Quiz
•
11th Grade - University
38 questions
Unit 6 Key Terms
Quiz
•
11th Grade - University
20 questions
La Hora
Quiz
•
9th Grade - University
7 questions
Cell Transport
Interactive video
•
11th Grade - University
7 questions
What Is Narrative Writing?
Interactive video
•
4th Grade - University