The Bitwise Operator Performs A Bitwise Exclusive OR Operation
The Bitwise Operator Performs A Bitwise Exclusive OR Operation
int[] anArray = {100, 200, 300, 400, 500, 600, 700, 800, 900, 1000};
System.out.println(anArray.length);
# Copy arrays:
# SWITCH
int month = 8;
String monthString;
switch (month) {
case 1: monthString = "January"; break;
String p1 ="pRaTik";
System.out.println(p1.toLowerCase());
# enhanced for statement
class EnhancedForDemo {
public static void main(String[] args){
int[] numbers = {1,2,3,4,5,6,7,8,9,10};
for (int item : numbers) {
System.out.println("Count is: " + item);
}
System.exit(0)
Math.random()
s1.equals(s2)
s1.equalsIgnoreCase(s2)
s1.charAt(N),
s1.substring(N,M), where N and M are integers, returns a value of type String. The returned
value consists of the characters in s1 in positions N, N+1,..., M-1. Note that the character in
position M is not included. The returned value is called a substring of s1.
s1.indexOf(s2) returns an integer. If s2 occurs as a substring of s1, then the returned value is
the starting position of that substring. Otherwise, the returned value is -1. You can also use
s1.indexOf(ch) to search for a particular
s1.compareTo(s2)
s1.toUpperCase()
s1.toLowerCase().