Long Quiz
Java
1. What is the difference between array and
variable?
A.Array and variable has no difference
at all
B.Array can store multiple value
depending on the number of index,
variable can store only one value at a
time
C.Array can be used
D.All of the above
2. Which of the following application
can be used in composing a java
program?
A.Google Chrome
B.MS Word 2014
C.Notepad++
D.None of the above
3. Which of the following does NOT
belong to the group?
A.One-dimensional Array
B.Two-dimensional Array
C.Single-dimensional Array
D. None of the above
4. What is the difference between
array and variable?
A.Array and variable has no difference at
all
B.Array can store multiple value depending
on the number of index, variable can
store only one value at a time
C.Array can be used
D.All of the above
5. The programming
statement above declare an
array with an index of
______.
A.5, from 0 to 4
B.5, from 1 to 5
C.5, from 0 to 5
D.None of the above
Int A[ ]=new int[5];
A[0]=4;
A[2]=5;
A[1]= A[0]+ A[2];
A[3]=3;
A[4]= A[1]+ A[3];
6. The statement
above declares an array
that can store what kind
of data?
A.character
B.boolean
C.integer
D.None of the above
Int A[ ]=new int[5];
A[0]=4;
A[2]=5;
A[1]= A[0]+ A[2];
A[3]=3;
A[4]= A[1]+ A[3];
7. The array declared
above is an example
of ________?
A.Single-dimensional array
B.One-dimensional array
C.Two-dimensional array
D.None of the above
Int A[ ]=new int[5];
A[0]=4;
A[2]=5;
A[1]= A[0]+ A[2];
A[3]=3;
A[4]= A[1]+ A[3];
8. Below are proper
way of declaring array
EXCEPT
___________?
A.Int a[]=new int[3];
B.Int a[]=new char[3];
C.Char a[]=new char[3];
D.None of the above
Int A[ ]=new int[5];
A[0]=4;
A[2]=5;
A[1]= A[0]+ A[2];
A[3]=3;
A[4]= A[1]+ A[3];
9. Which of the
following is the
final value of A[1]?
A.9
B.13
C.12
D.0
Int A[ ]=new int[5];
A[0]=4;
A[2]=5;
A[1]= A[0]+ A[2];
A[3]=3;
A[4]= A[1]+ A[3];
10. The final value of
A[4] is _______?
A.9
B.13
C.12
D.0
Int A[ ]=new int[5];
A[0]=4;
A[2]=5;
A[1]= A[0]+ A[2];
A[3]=3;
A[4]= A[1]+ A[3];
11. Below are looping types
EXCEPT for ______________?
A.While loop
B.For while loop
C.Do while loop
D.None of the above
12.Which of the following is not
one of the types of looping?
A.Do while loop
B.For loop
C.While loop
D.none
13. How many types of
looping statement do we
have?
A.1
B.2
C.3
D.100
14. What is the difference
between while and do while
loop?
A.While loop executes the statements, do
while loop do not execute at all
B.While loop and do while loop does not
have differences
C.Do while loop executes first before
evaluating the condition, while loop
executes after evaluating the condition
D.All of the above
15. What is the base of the
HEXADECIMAL number system?
A.16
B.8
C.2
D.10
16. What part of looping is
responsible for changing the value
of variable that is being evaluated
that causes the loop to stop?
A. condition
B. variable update
C. Statements
D. None of the above
17. What will happen if the
condition being evaluated returns
the value of TRUE?
A.The loop will stop
B.The loop will continue
C.The loop will not be affected
D.None of the above
18. What will happen if the condition
being evaluated returns the value of
FALSE?
A.The loop will stop
B.The loop will continue
C.The loop will not be affected
D.None of the above
19. If you fail to include variable
update that is supposed to cause
the condition to return false, the
loop will ________________?
A.Not stop
B.Stop immediately
C.Work perfectly
D.None of the above
20. Which of the following
statements best describe
looping?
A.Looping statements run programming
statements repeatedly
B.Looping runs selected programming
statements once
C.Looping statements run programming
codes 5 times
D.Syntax error
21.Below are examples of
commonly used java packages
EXCEPT _____________?
A.Java IO
B.Java UTIL
C.Java Service Pack 2
D.None of the above
22. Which of the following is
NOT true about java
packages?
A. Java packages can be used on java
programs
B. Java util and java io are examples
of java packages
C. Java packages requires internet
connection
D. None of the above
23. Which of the following is
an example of java method?
A.public static void main
B.public class method
C.public hyper market
D.Browsing the internet
24. Which of the following
statements is NOT correct
about java methods?
A. A method is a block of codes that
can be a part of java class
B. Java methods can be called in the
main method
C. Java method can be typed and
executed using ms word.
D. None of the above
25. The super class is
sometimes called
_________?
A.Child class
B.Park class
C.Mother class
D.None of the above
26. How do you call the class
that is using the properties of
another class?
A.Child class
B.Park class
C.Mother class
D.None of the above
27. How do you call the class that
has the properties being inherited
by the sub class?
A.Super class
B.Over load class
C.Open class
D.None of the above
TEST II: MULTIPLE CHOICE. Identify
the final output of the following
programming logical operations.
Write your answer on a separate
sheet of paper.
Given: A=5, B=5,C=11,D=7;
28. A>=B
a. true b. False
Given: A=5, B=5,C=11,D=7;
29. A==B || B>=D
A.True b. False
Given: A=5, B=5,C=11,D=7;
30. (B==A || B>=C) &&
D+A>=C
A. True b. False

Long Quiz for Java Programming - Basics plus Array and looping .pptx

  • 1.
  • 2.
    1. What isthe difference between array and variable? A.Array and variable has no difference at all B.Array can store multiple value depending on the number of index, variable can store only one value at a time C.Array can be used D.All of the above
  • 3.
    2. Which ofthe following application can be used in composing a java program? A.Google Chrome B.MS Word 2014 C.Notepad++ D.None of the above
  • 4.
    3. Which ofthe following does NOT belong to the group? A.One-dimensional Array B.Two-dimensional Array C.Single-dimensional Array D. None of the above
  • 5.
    4. What isthe difference between array and variable? A.Array and variable has no difference at all B.Array can store multiple value depending on the number of index, variable can store only one value at a time C.Array can be used D.All of the above
  • 6.
    5. The programming statementabove declare an array with an index of ______. A.5, from 0 to 4 B.5, from 1 to 5 C.5, from 0 to 5 D.None of the above Int A[ ]=new int[5]; A[0]=4; A[2]=5; A[1]= A[0]+ A[2]; A[3]=3; A[4]= A[1]+ A[3];
  • 7.
    6. The statement abovedeclares an array that can store what kind of data? A.character B.boolean C.integer D.None of the above Int A[ ]=new int[5]; A[0]=4; A[2]=5; A[1]= A[0]+ A[2]; A[3]=3; A[4]= A[1]+ A[3];
  • 8.
    7. The arraydeclared above is an example of ________? A.Single-dimensional array B.One-dimensional array C.Two-dimensional array D.None of the above Int A[ ]=new int[5]; A[0]=4; A[2]=5; A[1]= A[0]+ A[2]; A[3]=3; A[4]= A[1]+ A[3];
  • 9.
    8. Below areproper way of declaring array EXCEPT ___________? A.Int a[]=new int[3]; B.Int a[]=new char[3]; C.Char a[]=new char[3]; D.None of the above Int A[ ]=new int[5]; A[0]=4; A[2]=5; A[1]= A[0]+ A[2]; A[3]=3; A[4]= A[1]+ A[3];
  • 10.
    9. Which ofthe following is the final value of A[1]? A.9 B.13 C.12 D.0 Int A[ ]=new int[5]; A[0]=4; A[2]=5; A[1]= A[0]+ A[2]; A[3]=3; A[4]= A[1]+ A[3];
  • 11.
    10. The finalvalue of A[4] is _______? A.9 B.13 C.12 D.0 Int A[ ]=new int[5]; A[0]=4; A[2]=5; A[1]= A[0]+ A[2]; A[3]=3; A[4]= A[1]+ A[3];
  • 12.
    11. Below arelooping types EXCEPT for ______________? A.While loop B.For while loop C.Do while loop D.None of the above
  • 13.
    12.Which of thefollowing is not one of the types of looping? A.Do while loop B.For loop C.While loop D.none
  • 14.
    13. How manytypes of looping statement do we have? A.1 B.2 C.3 D.100
  • 15.
    14. What isthe difference between while and do while loop? A.While loop executes the statements, do while loop do not execute at all B.While loop and do while loop does not have differences C.Do while loop executes first before evaluating the condition, while loop executes after evaluating the condition D.All of the above
  • 16.
    15. What isthe base of the HEXADECIMAL number system? A.16 B.8 C.2 D.10
  • 17.
    16. What partof looping is responsible for changing the value of variable that is being evaluated that causes the loop to stop? A. condition B. variable update C. Statements D. None of the above
  • 18.
    17. What willhappen if the condition being evaluated returns the value of TRUE? A.The loop will stop B.The loop will continue C.The loop will not be affected D.None of the above
  • 19.
    18. What willhappen if the condition being evaluated returns the value of FALSE? A.The loop will stop B.The loop will continue C.The loop will not be affected D.None of the above
  • 20.
    19. If youfail to include variable update that is supposed to cause the condition to return false, the loop will ________________? A.Not stop B.Stop immediately C.Work perfectly D.None of the above
  • 21.
    20. Which ofthe following statements best describe looping? A.Looping statements run programming statements repeatedly B.Looping runs selected programming statements once C.Looping statements run programming codes 5 times D.Syntax error
  • 22.
    21.Below are examplesof commonly used java packages EXCEPT _____________? A.Java IO B.Java UTIL C.Java Service Pack 2 D.None of the above
  • 23.
    22. Which ofthe following is NOT true about java packages? A. Java packages can be used on java programs B. Java util and java io are examples of java packages C. Java packages requires internet connection D. None of the above
  • 24.
    23. Which ofthe following is an example of java method? A.public static void main B.public class method C.public hyper market D.Browsing the internet
  • 25.
    24. Which ofthe following statements is NOT correct about java methods? A. A method is a block of codes that can be a part of java class B. Java methods can be called in the main method C. Java method can be typed and executed using ms word. D. None of the above
  • 26.
    25. The superclass is sometimes called _________? A.Child class B.Park class C.Mother class D.None of the above
  • 27.
    26. How doyou call the class that is using the properties of another class? A.Child class B.Park class C.Mother class D.None of the above
  • 28.
    27. How doyou call the class that has the properties being inherited by the sub class? A.Super class B.Over load class C.Open class D.None of the above
  • 29.
    TEST II: MULTIPLECHOICE. Identify the final output of the following programming logical operations. Write your answer on a separate sheet of paper.
  • 30.
    Given: A=5, B=5,C=11,D=7; 28.A>=B a. true b. False
  • 31.
    Given: A=5, B=5,C=11,D=7; 29.A==B || B>=D A.True b. False
  • 32.
    Given: A=5, B=5,C=11,D=7; 30.(B==A || B>=C) && D+A>=C A. True b. False