Exceptions
CommandLine Arguments
Predefined Methods
Predefined
String Methods
100

An event that interrupts the normal processing flow of a program.

What is an exception?

100

These allow the user to affect the operation of an application for one invocation.

What are command-line arguments?

100

This line produces the output.

System.out.print("have a prayerful holy week");

What is have a prayerful holy week?

100

This line produces the output:

String msg = "God is good.";

System.out.print(msg.equals("god is good."));

What is false?

200

This causes our program to terminate abnormally.

What is an exception?

200

This question mark in this syntax completes the how to compile a program from the command line.

javac ?

What is filename?

200

This line produces the output.

System.out.print("Sum is " + (5 + Integer.parseInt("25")));

What is Sum is 30?

200

This line produces the output:

String msg = "God is good.";

System.out.print("He" + msg.substring(3,12));

What is He is good?

300

Exception objects are created from classes in the Java API hierarchy. All exception classes in the hierarchy are derived from this class.

What is the Throwable class?

300

This question mark in this syntax completes the how to run a program from the command line.

java ? arguments

What is the class name?

300

This line produces the output.

System.out.print(Math.pow(2,3));

What is 8.0?

300

This line produces the output:

String msg = "god is good.";

System.out.print(msg.indexOf("go"));

What is 0?

400

In a try catch finally block, there is a try block, one or more catch blocks, but only of this block.

What is the finally block?

400

Running the code below prints this output using the command in the command-line.

System.out.print(args[2]);

java ClassName We are blessed


What is blessed?

400

This line produces the output.

System.out.print(Math.abs(-80));

What is 80?

400

This line produces the output:

String msg = "cheeseburger";

System.out.print(msg.regionMatches(6,"cheese",0,6));

What is false?

500

This notation is mandatory in the try catch finally blocks.

What is the block notation?
500

Running the code below prints this output using the command in the command-line.

for (int i=0; i<args.length; i++) System.out.print(args[i]);

java ClassName God is good!

What is God is good!?
500

This line produces the output.

System.out.print(Math.pow(5,3));

What is 125.0?

500

This line produces the output:

String msg = "cheeseburger";

System.out.print(msg.replace('e','o'));

What is choosoburgor?

M
e
n
u