New Terms | Heaton Research

New Terms

Get the entire book!
Java for the Beginning Programmer

case A case statement occurs inside of a switch statement. There is one case statement for each decision that the switch/case can make.

default If none of the case statements are executed, and a default statement is provided, the default statement will be executed.

else The else statement works with the if statement. If the if statement does not execute, then the else statement will be executed.

equals The equals method can be used to compare two strings. For example str.equals(“Java”) compares str to “Java”.

equalsIgnoreCase The equalsIgnoreCase method can be used to compare two strings, without regard to case. For example str.equalsIgnoreCase(“Java”) compares str to “JAVA” would be true.

if The if statement allows Java to make decisions and compare variables.

if/else Ladder A series of if/else statements together is called an if/else ladder. If/else laddres are often replaced with switch/case statements.

switch Switch statements are used to compare a variable to any of the provided case statements. If no case statement matches, the default statement (if provided) will be executed.

Copyright 2005-2008 by Heaton Research, Inc.