Tag Archives: Integer Value

valueOf(all types) JAVA – JAVA 10th Class notes – ICSE JAVA Notes

valueOf(all types) JAVA – JAVA 10th Class notes – ICSE JAVA Notes valueOf (all types) : valueOf (all types) function converts from String to the primitive datatype.   Note : Conversion from String to primitive datatype is only possible when it contains number (digit). If this function is used with Alphabets or Alpha numeric String […]

Length in JAVA – JAVA 10th Class notes – ICSE JAVA Notes

Length  in JAVA – JAVA 10th Class notes – ICSE JAVA Notes length() : length() function is used to find the length of the String, that is the number of characters present in the String. It returns a Integer Value, as length is a integer number. Syntax : int var = str.length(); Example : String […]

Character is LastIndexOf (char ch) in JAVA – JAVA 10th Class notes – ICSE JAVA Notes

Character is LastIndexOf (char ch) in JAVA – JAVA 10th Class notes – ICSE JAVA Notes lastIndexOf(Char ch) : lastIndexOf(Char ch) function returns the Index of the last occurrence of the specified character within the String. It returns a Integer Value. Syntax : int var = str.lastIndexOf(ch); Example : String str= “JAVA”; int res=str. lastIndexOf […]

Character is indexOf (char ch) in JAVA – JAVA 10th Class notes – ICSE JAVA Notes

Character is indexOf (char ch) in JAVA – JAVA 10th Class notes – ICSE JAVA Notes   indexOf(char ch) : indexOf(char ch) function returns the Index of the first occurrence of the specified character within the String. It returns a Integer Value. Syntax : int var = str.indexOf(ch); Example : String str= “JAVA”; int res=str.indexOf(‘A’); […]

ICSE Java Programs – Program to illustrate the use of Unary Operators

ICSE Java Programs – Program to illustrate the use of Unary Operators /* Program to illustrate the use of Unary Operators */   import java.io.*;   class Operators { public static void main(String args[])throws IOException { InputStreamReader isr=new InputStreamReader(System.in); BufferedReader br=new BufferedReader(isr);   int a,res,b,c; System.out.println(” Enter an Integer Value : “); a=Integer.parseInt(br.readLine()); res=+a; System.out.println(” […]