Font size
WorksheetsBasics of Java
Total questions: 20
Worksheet time: 42mins
Attributes of an object are also known as
methods
properties
classes
functions
The "method" is another name for
an object
a class
a function
a variable
When programming, you have to use Data Types. Which of the following refers to interfaces, classes, and arrays?
Primitive
Non-Primitive
Arrays
Boolean
Java Tokens help the compiler. Which of the following is a type of Java Token?
Identifiers
Keywords
Operators
All of the answers.
Java programs are _____________
Translated
Compiled
Interpreted
Understood
________ & _________ are two types of java programs
Application
Applets
Operating System
System Software
(a) java package supports scanner classes
(a) java package supports math functions
Who developed Java?
James Gosling
Bjarne Stroustrup
Robert James
None
(a) is the smallest individual unit of a program that holds a meaning for the compiler.
(a) are particular words which acts as a key to a code. These are predefined words by Java so it cannot be used as a variable or object name.
(a) are non graphic characters, which are used as commands to direct the cursor while printing.
(a) is conversion of one datatype to another with users intervention.
What is the default value of a Boolean variable?
True
true
False
false
Conversion of one data type to the other without user intervention is known as
(a)
Consider the following code segment:
int var = 12;
var = var % 7;
var = var - 1;
System.out.println(var);
What is printed as a result of executing the code segment?
0
1
2
4
5
Assume that a, b, and c have been declared and initialized with int values. The expression
!(a > b || b <= c)
is equivalent to which of the following?
a > b && b <= c
a <= b || b > c
a <= b && b > c
a < b || b >= c
a < b && b >= c
