Exam 1: Getting Started
Exam 1: Getting Started45 Questions
Exam 2: Console Input and Output29 Questions
Exam 3: Flow of Control44 Questions
Exam 4: Defining Classes I45 Questions
Exam 5: Defining Classes II46 Questions
Exam 6: Arrays46 Questions
Exam 7: Inheritance43 Questions
Exam 8: Polymorphism and Abstract Classes43 Questions
Exam 9: Exception Handling45 Questions
Exam 10: File IO46 Questions
Exam 11: Recursion44 Questions
Exam 12: Uml and Patterns22 Questions
Exam 13: Interfaces and Inner Classes32 Questions
Exam 14: Generics and the Arraylist Class32 Questions
Exam 15: Linked Data Structures43 Questions
Exam 16: Collections,maps,and Iterators44 Questions
Exam 17: Swing I37 Questions
Exam 18: Swing II31 Questions
Exam 19: Java Never Ends26 Questions
Exam 20: Applets25 Questions
Select questions type
How is the % modulus)operator used? What is the common use of the modulus operator?
Free
(Essay)
4.9/5
(39)
Correct Answer:
The modulus operator is used to return the remainder in integer division.For example,the modulus operator is commonly used to determine if a number is an even or an odd value.
What is the value of the variable amountDue? double price = 2.50;
Double quantity = 5;
Double amountDue = 0;
AmountDue = price * quantity;
Free
(Multiple Choice)
4.9/5
(40)
Correct Answer:
C
An advantage of using the Unicode character set is that it easily handles languages other than English.
(True/False)
4.8/5
(42)
What is the value of the variable c in the statements that follow? String phrase = "Make hay while the sun is shining.";
Char c = phrase.charAt10);
(Multiple Choice)
4.9/5
(46)
Write a Java statement to access the 7< sup >th< /sup > character in the String variable myString and place it in the char variable c.
(Essay)
4.8/5
(33)
List the primitive data types Java supports.Indicate the kind of values each type can store.
(Essay)
4.8/5
(35)
What is the output of the following Java statements?
//String method examples
String str = "Java Programming!";
System.out.printlnstr.equals"Java Programming!"));
System.out.printlnstr.toLowerCase));
System.out.printlnstr.toUpperCase));
System.out.printlnstr.substring5,8));
System.out.printlnstr.lastIndexOf"m"));
(Essay)
4.8/5
(37)
Java does not require that a variable be declared before it is used within a program.
(True/False)
4.8/5
(41)
In Java,source code is compiled into object code called ______________.
(Multiple Choice)
4.8/5
(34)
What is the output produced by the following lines of code?
int value1 = 3;
int value2 = 4;
int result = 0;
result = value1++ * value2--;
System.out.println"Post increment/decrement: " + result);
result = ++value1 * --value2;
System.out.println"Pre increment/decrement: " + result);
(Essay)
4.8/5
(40)
Showing 1 - 20 of 45
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)