Which statement is true about Java?
Do you know some Java basics?

Quiz
•
Computers
•
9th - 12th Grade
•
Hard
Dior R. Nguyen (GCC Instructor)
Used 3+ times
FREE Resource
14 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Java is a sequence-dependent programming language
Java is a code dependent programming language
Java is a platform-dependent programming language
Java is a platform-independent programming language
Answer explanation
Java is called ‘Platform Independent Language’ as it primarily works on the principle of ‘compile once, run everywhere’.
2.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which of these cannot be used for a variable name in Java?
Identifier & keywords
Identifier
Keywords
None of the above
Answer explanation
Keywords are specially reserved words that can not be used for naming a user-defined variable.
For example: class, int, for, etc.
3.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What is the extension of java code files?
.txt
.java
.py
.html
4.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What will be the output of the following Java code?
16
24
32
48
Answer explanation
Operator ++ acts like a "plus 1" (increment), so g becomes 4 and when multiplied by 8 gives 32.
5.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What is the extension of compiled java classes?
.class
.java
.js
.code
6.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which exception is thrown when java is out of memory?
MemoryError
OutOfMemoryError
MemoryOutOfBoundsException
MemoryFullException
Answer explanation
The Xms flag has no default value, and Xmx typically has a default value of 256MB. A common use for these flags is when you encounter a java.lang.OutOfMemoryError.
7.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What will be the output of the following Java code?
a
b
abc
c
Answer explanation
String(chars) is a constructor of class string, it initializes string s with the values stored in character array chars, therefore s contains “abc”.
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
Coding a Game Quiz p4

Quiz
•
12th Grade
17 questions
How Software Interacts with Hardware

Quiz
•
11th Grade
10 questions
Chapter 01 Worksheet

Quiz
•
10th Grade
17 questions
Different Kinds of Code (Machine, assembly, compiled, scripting)

Quiz
•
12th Grade
14 questions
year 8 lesson 2 quiz - python

Quiz
•
8th - 10th Grade
11 questions
OCR J277 2.5 Characteristics and purpose of languages

Quiz
•
9th - 12th Grade
12 questions
Coding and Robotics

Quiz
•
8th - 12th Grade
10 questions
Edexcel GCSE Computer Science Topic 3: Computers

Quiz
•
12th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University