Java Basic Online Quiz
Description: Java basics | |
Number of Questions: 30 | |
Created by: Shaka Gupte | |
Tags: programming |
If the last index of array list is 12, what is the length of the array?
What is the index of the last element of array list[]?
How do you declare an array of ten Strings?
How do you declare an array of booleans?
What Java keyword can be used to end a method?
What Java keyword is used to create objects?
What is the value of "This is Patrick".length()?
The technique of breaking a problem down into smaller, more easily managed pieces, is called:
Which error prevents Java from running your program?
Who coined the terms "bug" and "debug"?
Which of the following are valid Java String literals?
What is the value of "1" + "3" + 2?
What is the value of (int) Math.abs((double) 5 / -4 )?
If x is an integer > 10, how would you print the ten's digit?
Which of the following type conversions requires an explicit type cast?
What is the value of 3 * 7 + 8.4 / 2?
If str="foolishness", which expression returns "ess"?
If str="foolishness", which expression returns "lish"?
Given x is an integer, which of the following is a valid conditional?
What values can be generated by the following code: (int) (Math.random() * 3)
How do you create an array of 20 integers?
Which of following constant declarations is valid?
Which loop will iterate 10 times?
Which of the following class names follows proper Java naming conventions?
Which of the following variable names follows proper Java naming conventions?
Which of following are legal Java identifiers?
Which value can you assign to a boolean variable?
Which is the correct signature for the main() method?
Which of following is not a primitive data type?