Anda di halaman 1dari 11

QUIZ No.

1 Select the class declaration that adheres to the class-naming


guidelines/convention.
-class shirt

2. This are the blueprints that you create to define the objects in a
program.
-classes

3. It is a special method that the JVM recognizes as the starting point


for every Java technology program that runs from a command line.
-main metod

4. It lets you place breakpoints in your source code, add field watches,
step through your code, run into methods, take snapshots and monitor
execution as it occurs.
-debugger

5. It watch references to objects while debugging a program.


-heapwalker

6. GUI for Java stands for:


- Graphical User Interface

7. It signifies a block of code and it enclose the code for a specific


method or the code for an entire class.
- braces

8. This are used to indicate input data (also called "arguments") that
can be passed into a method.
- Parenthesis
9. It signifies the end of a statement for a java code.
- semicolons

10. It separates multiple arguments and values.


- Commas
-
11. It defines a single character value.
- Single Quotation marks

12. It indicates a single-line comment.


- double forward slashes

QUIZ NO. 4

1. This are used to store and retrieve data for your program.
- Variables
2. The variable declaration public int myInteger=10; adheres to the
variable declaration and initialization syntax.
- True
3. This are called as instance variables because their values are
unique to each individual instance of a class.
- Fields
4. Which of the following is the example of Integral Type?
- Short
5. Which of the following is an example of Floating-Point Type?
- Float
6. Which of the following data types accepts only True or False
value?
- Boolean
7. What are the allowed special characters in naming a variable?
- Underscore
8. What operator assigns the value on the right side to the item on
the left side?
- Equal operator
9. It is a memory that consists of dynamically allocated memory
chunks containing information used to hold objects while they
are needed by your program.
- Heap memory
10. Which statement is true?
- c. There are eight primitive types built in to the Java
programming language.

QUIZ NO. 5

1. What operator is used with an object reference to manipulate the


values or to invoke the methods of a specific object?
- DOT OPERATOR
2. Which of the following lines of code instantiates a Boat object
and assigns it to a sailBoat object reference?
- Boat sailBoat = new Boat ();
3. It is one of the many classes included in the Java class libraries
that provides you with the ability to store a sequence of
characters.
- STRING CLASS
4. Which of the following operator is used as special concatenation
operator?
- PLUS SIGN (+)
5. It is a very detailed document outlining the classes in the API.
- JAVA CLASS LIBRARY SPECIFICATION
6. Which of the following methods create a new line after printing
the string?
- printIn
7. Which of the following statements is not true?
QUIZ NO. 6

1. This is type of operator that compare two values to determine


their relationship.
- Relational operator
2. Which of the following is not a common conditional operator?
- ++
3. Which of the following keyword is not used for decision making?
- break
4. What is the purpose of the else block in an if/else statement?
- To contain code that is executed when the expression in an if
statement is false
5. Which of the following sentences is suitable for testing a value in a
switch construct?
-

QUIZ NO. 7

1. An Array is a container object that holds a group of values of a


single type.
-true

2. ArrayList has a set of useful methods for managing its elements


like add(), get(), remove(), indexOf() and others.
- True

3. ArrayList is in the package java.util.


- True
4. A two-dimensional array is similar to a matrix.
- False

5. A Value in the array can be a primitive or an object type.


- True
6. Each item in an array is called an element.
- True
7. In declaring for arrays of char and int type, we write:
-true

8. Arrays are objects referred to by an object reference variable.


- True
9. array_identifier = new type [length]; is the syntax for an
Instantiating Array.
- True
10. When you pass strings to your program on the command
line, the strings are put in the args array.
- True
11. Two dimensional arrays require an additional set of square
brackets.
- True
12. ArrayList is one of a number of list classes.
-true

QUIZ NO. 8

1. This is frequently used in programs to repeat blocks of


statement until an expression is false.
- Loops
2. _____________ enable you to check and recheck a decision
to execute and re-execute a block of code.
-loops
3. Which of the following loops always executes at least once?
- The do/while loops

4. . Which of the following loop will iterate indefinitely through


statements and to perform the statements zero or more times?
-While loops
5. Which of the following loop will step through the statements
with a predefined number of times?
- For loops

6. It is a useful keywords that is used with loops wherein it


enables you to jump out of a loop.
- Breaks
7. It is a useful keyword that is used with loops wherein it sends
you back to the start of the loop.
- Continue
8. It is often used to repeat a set of commands a specific number
of times.
- Loops

QUIZ 9

1. The display keyword indicates that the method does not return a
value.
VOID

2. There is no limit to the number of method calls that a calling


method can make.
-TRUE

3. Some functionality of the Math class are Differential, Integral,


Numerical and Random.
- FALSE

4. char asciiChar = (char)(Math.random() * 26 +97);


is a Math Utilities that allows you to create a random letters.
- TRUE

5. public void printValues(int pantSize, float ageInYears) is a method


that corresponds to the
myPerson.printValues(100,147.7F,"lavander");
- FALSE

6. Empty parentheses indicate that no arguments are passed to the


method.
- TRUE

7. Worker method is a method that invoke or call another method to


do some work.
- FALSE

8. Calling a method in the same class is very straightforward because


you can simply use the method name without a reference and dot
notation.
- TRUE

9. By using a method it makes the program hard to read and much


complex to maintain.
-FALSE

10. A Method must always specify a return type.


- TRUE

11. A class can contain only one method declaration.


- FALSE

12. The same method can be both a worker method and a calling
method.
- TRUE

13. Arguments need not to be listed in the same order in the method
invocation as in the method signature.
- FALSE
QUIZ 10

1. Encapsulation means hiding object fields by making all fields


private with the use of getter and setter methods.
- TRUE
2. Based on the lecture on Chapter 10, the code below is not a
valid Color Code.
theShirt.setColorCode('Z');
- TRUE
3. Encapsulation protects data by making all fields private, by
mandating programming to the interface and by encouraging
good OO design.
- TRUE
4. Constructor is the special method that makes instantiating and
initializing an object more convenient.
– TRUE
5. [modifiers] represent several unique Java technology keywords
that can modify the way constructors are accessed.
- TRUE
6. public Penny() is the default constructor for the following class.
public class Penny {
String name = "lane";
}
-TRUE

QUIZ NO. 11

1. It enables the programmers to put common members (fields


and methods) in one class (the superclass) and have other
classes (the subclasses) inherit these common members from
this new class.
- Inheritance

2. [class modifier] class class_identifier extends


superclass_identifier is the syntax for declaring what?
- Subclass
3. It is referred to as creating classes that are general and may
contain methods without particular implementation or method
body code.
- Abstraction

4. It is an operator that returns true if the object referenced by cl


is a trousers object.
- Instanceof
5. It is a method that the invocation does not know or need to
know the type of the object, but the correct method-that is,
the method of the actual object-will be invoked.
- Polymorphic method
6. How can you change the reference type of an object?
- By declaring new reference and assigning new objects
-
7 . This calls the toString() method on the StringBuilder object.
StringBuilder overrides the toString() method that it inherits
from Object to return a String object of the set of characters it is
representing.
-StringBuilder Object

7. Which methods of an object can be accessed via an interface


that it implements?
The methods declare in an interface

QUIZ NO. 1
1. Based on the Nielsen Online (Gartner 2010), How many
desktops are running Java?
-1.1 BILLION DESKTOP

2. It is another version of Java that is used to create applications


for resource-constrained consumer devices such as mobile
phone.
-JAVA ME

3. Java Card is typically used in the following areas: Identity,


Security, Mobile phone SIMs and ____________
-TRANSACTIONS

4. IDE for java stands for:


-INTEGRATED DEVELOMENT ENVIRONMENT

5. It is the process of investigating a problem that you want to


solve with your product.
-ANALYSIS

6. It is a stage wherein usually perform by a team of people other


than those who actually developed the product wherein they
ensures that individual components or the product as a whole,
meet the requirements.
-TESTING

7. PLC stands for:


-PRODUCT LIFE CYCLE

8. What is the former name of Java Programming Language?


-OAK

9. Who led the creation of Java Programming Language?


-JAMES GOSLING
10. It is the difference of Java with procedural
programming because it is stress here the creation and
interaction of objects.
-OBJECT ORIENTED PROGRAM

11. CORBA in Java stands for:


-COMMON OBJECT REQUEST BROKER ARCHITECTURE

12. It is the ability to allow several tasks to run


concurrently (at the same time), such as querying a database,
performing long-running and complex calculations and
displaying a user interface.
-MULTI-THREADED

13. The java programming language is said to be


platform-independent because:
- The format of a compiled Java program is CPU-specific code

14. It is an edition of Java that is used to develop applets


and application that run within web browsers and on desktop
computers.
-JAVA SE

15. It is an edition of Java that is used to create large


enterprise, service-side and client-side distributed applications.
-JAVA EE

QUIZ 2

Anda mungkin juga menyukai