The program below demonstrates the rolling of the pair of dice until the pair gets a total of 2. The program has instance variables die1 and die2 which are private.
The program below demonstrates the rolling of the pair of dice until the pair gets a total of 2. The program has instance variables die1 and die2 which are private.
This program loops through the alphabets and also prints their corresponding number sequence.
The program below demonstrates how to replace a substring with a new String.
The program below checks the Strings if they are exactly the same and returns true if they are equal (use of == operator).
The program below demonstrates the use of equalsIgnoreCase() method. It checks whether the Strings are equal or not regardless of the cases.
WE show here that we can leave a loop on demand with a break statement thus changing the flow of control at a certain desire.