Tag Archives: Res

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

trim in JAVA – JAVA 10th Class notes – ICSE JAVA Notes trim( ) : trim( ) function is used to remove the blank spaces form either side of the string. The Blank spaces that are available in between the words, remain unchanged.   Syntax : String var= str.trim();   Example : String str= “  […]

substring(int beginindex, int endindex) in JAVA – JAVA 10th Class notes – ICSE JAVA Notes

substring(int beginindex, int endindex) in JAVA – JAVA 10th Class notes – ICSE JAVA Notes substring(int beginindex, int endindex) : substring(int beginindex, int endindex) function is used to extract a part of the string. This extracted part of the main string is known as the Substring. Syntax : String var=str.substring(index); Example : String str= “COMPUTER”; […]

replace( char oldch, char newch) in JAVA – JAVA 10th Class notes – ICSE JAVA Notes

replace( char oldch, char newch)  in JAVA – JAVA 10th Class notes – ICSE JAVA Notes   replace( char oldch, char newch) : replace( char oldch, char newch) function replaces all the occurrences of the specified old character with the new character within the given String.   Syntax : String res=str.replace (oldch, newch);   Example : […]

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

ToUpperCase  in JAVA – JAVA 10th Class notes – ICSE JAVA Notes   toUpperCase( ) : toUpperCase( ) function will convert all the characters of the String to Upper Case. If any character is in Upper Case or it is a Special Character, then it will remain the same.   Syntax : String res = […]

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 find the Economy Rate of the Bowler

ICSE Java Programs – Program to find the Economy Rate of the Bowler /* Program to find the Economy Rate of the Bowler */   import java.io.*;   class Pgms { public static void main(String args[])throws IOException { InputStreamReader isr=new InputStreamReader(System.in); BufferedReader br=new BufferedReader(isr); System.out.print(” Enter the Name of the Bowler : “); String name=br.readLine(); […]

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(” […]

ICSE Java Programs – Program to Evaluate the Power Function

ICSE Java Programs – Program to Evaluate the Power Function   /* Program to Evaluate the Power Function Expression : a2 + b2                                */   import java.util.*;   class MathClass { public static void main( String args[]) { int a,b,c; double res; Scanner scn=new Scanner(System.in); System.out.print(” Enter the Values for a and b : “); […]

ICSE Java Programs – Program to evaluate the Square Root Function

ICSE Java Programs – Program to evaluate the Square Root Function /* Program to evaluate the Square Root Function Expression : Square_Root(a2+b2+c2)        */   import java.util.*;   class MathClass { public static void main( String args[]) { int a,b,c; double res; Scanner scn=new Scanner(System.in); System.out.println(” Enter the Values for a b and c : “); […]