Java Programming Basics
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
Mahen Jayalath
Used 41+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is wrong with the following Java variable declaration?
int 1stNumber = 23;
There is no data type called 'int'
Variable names can not start with a digit
Variable names can not contain digits
Number 23 can not be stored in an int
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following variable declarations are incorrect?
a. float mySalary = 3500.77;
b. int my1stSalary = 2300;
c. double salaryOne = 3450.0f;
d. double salary(1);
a and b
a and d
c and d
b and d
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Following set of data items are to be stored about a student
a. Students name
b. Students current age in years
c. Students weight in kg
d. Students gender
Which of the following data types will match best with these
a. String
b. int
c. String
d. String
a. String
b. float
d. int
d. int
a. String
b. int
c. float
d. boolean
a. String
b. int
c. float
d. char
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following data is the 'smallest' data type that can be used to hold the 'distance between Earth to Mars' in km.
(Average distance between Earth and March is 234,460,000 km)
byte
int
long
short
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statement prints smith\exam1\test.txt?
System.out.println("smith\exam1\test.txt");
b.System.out.println("smith\\exam1\\test.txt");
c.System.out.println("smith\"exam1\"test.txt");
d.System.out.println("smith"\exam1"\test.txt");
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
17. What is the output of System.out.println('z' - 'a')?
25
26
x
Generates and error
7.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
What is true about the provided code?
count < 100 is always true at Point A
count < 100 is always true at Point B
count < 100 is always false at Point B
count < 100 is always true at Point C
count < 100 is always false at Point C
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
Quiz - CSE
Quiz
•
University
10 questions
Hands-on Modul 3
Quiz
•
University
10 questions
Visual Basic 2010
Quiz
•
8th Grade - University
10 questions
CS100||MsWord
Quiz
•
University
11 questions
Types of Mass Media
Quiz
•
10th Grade - Professi...
14 questions
Binary Tree
Quiz
•
University
15 questions
Chapter 8 - Memory Management Strategies
Quiz
•
University
10 questions
Website Usability and UX
Quiz
•
University
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
9 questions
Principles of the United States Constitution
Interactive video
•
University
18 questions
Realidades 2 2A reflexivos
Quiz
•
7th Grade - University
10 questions
Dichotomous Key
Quiz
•
KG - University
25 questions
Integer Operations
Quiz
•
KG - University
7 questions
What Is Narrative Writing?
Interactive video
•
4th Grade - University
20 questions
SER vs ESTAR
Quiz
•
7th Grade - University
