3:53 pm - Friday March 24, 2502

Tag Archives: int

Character Example Program for codePointBefore(CharSequence seq,int index)

/** *Character Example Program for codePointBefore(CharSequence seq,int index) * @author   candidjava.com * @description: this method gives an integer which specifies the number of  character Unicode codes which will be generated if...

Short Example Program for intValue()

/** *Short Example Program for intValue(). * @author   : candidjava * @description: this program returns the value of the Short object as an int. */ public class ShortToInt { public static void main(String[] args) { Short sh...

Double Example Program for intValue()

// Double Example Program for intValue() /** * @author: candidjava.com * @description: This program returns the integer value of the Double object */ public class Int { public static void main(String[] args) { Double d = new...

Character Example Program for isDefined(int codePoint)

/** * Character Example Program for isDefined(char ch) * * @author:Candidjava.com * @description:this method returns true if the char is defined in the Unicode * character set; false otherwise. */ public class...

Math Example Program for scalb(float f,int scaleFactor)

//Math Example Program for scalb(float f,int scaleFactor) /** * @author:candidjava.com * @description:scalb(float f, int scaleFactor) Return f * 2^scaleFactor * rounded as if performed by a single correctly rounded * floating-point...

ArrayList Example Program for removeRange(int fromIndex, int toIndex)

/** *@author :CandidJava.com *@descriptions : This program explain the function and use of removeRange(int fromIndex, int toIndex).It is used to remove element from between given index range values */ import java.io.*; import java.util.*; public...

ArrayList Example Program for remove(Object o)

/** *@author :CandidJava.com *@descriptions : This program explain the function and use of remove(Object o).It is used to check whether first occurence of given element is removed from list or not */ import java.io.*; import java.util.*; public...

ArrayList Example Program for remove(int index)

/** *@author :CandidJava.com *@descriptions : This program explain the function and use of remove(int index).It is used to remove an element from list by using index value */ import java.io.*; import java.util.*; public class ArrayListRemoveIndex { public...

String Example Program for lastIndexOf(String str)

/** @AUTHOR: candid java @DESCRIPTION: coding to find the index of specified string. */ public class LastIndexOfStr { public static void main(String args[]) { String s ="Web Technology"; System.out.println(s); ...

String Example Program for lastIndexOf(int ch,int fromIndex)

/** @AUTHOR: candid java @DESCRIPTION: coding for find the index of the specified character within the specified index */ public class LastIndexOfChar { public static void main(String args[]) { String s = "Java language"; ...

StringBuilder Example Program for setCharAt(int index,char ch)

/** @Author: Candidjava.com Description: source code to print the index of last occurance of a particular character in a given input string . */ import java.io.*; import java.lang.String; public class Slastindexof { public static void...

StringBuilder Example Program for replace(int start,int end,String str)

/** @Author: Candidjava.com @Description:source code to replace a particular character in a string with another character */ import java.io.*; import java.lang.String; public class Sreplace { public static void main(String[] args)throws...

Long Example Program for valueOf(String s,int radix)

/** @author: candidjava @description: valueOf(String s,int radix) is return a Long object holding the value represented by the string argument in the specified radix. */ public class DeeValueOfStringRadixLong { public static void main(String[]...

Long Example Program for toString(long i,int radix)

/** @author: candidjava @description: toString(long i,int radix) is used to a string representation of the argument in the specified radix. */ public class DeeToStringLong { public static void main(String[] args) { Long l=new Long(2468);//get...

StringBuilder Example Program for deleteCharAt(int index)

/** @author: candidjava @description: deleteCharAt(int index) is used to delete index position character in the string and return new strings */ public class DeeDeleteCharAtStrBuffer { public static void main(String[] args) { StringBuffer...

String Example Program for length()

/** @author: candidjava @description: length() is used to find the length of the string. */ public class DeeLength { public static void main(String[] args) { String s="candid java";//get the string System.out.println("string...

String Example Program for lastIndexOf(String str,int fromIndex)

/** @author: candidjava @description: lastIndexOf(String str, int fromIndex) is used to the new string is in given string searching based on index */ public class DeeLastIndexOf { public static void main(String[] args) { String s1="candid...

String Example Program for intern()

/** @author: candidjava @description: intern () method is used to a string that has the same contents as this string, but is guaranteed to be from a pool of unique strings. */ public class DeeIntern { public static void main(String[]...

String Example Program for getChars(int srcBegin,int srcEnd, char[] dst, int dstBegin)

/** *@author: candidjava *@description: getChars(int srcBegin,int srcEnd, char[] dst, int dstBegin) method is used to cut the character in given string. To print new string based on the dstBegin values */ public class DeeGetChars { public...

Stack Example Program for setSize(int newSize)

/** *@author :CandidJava.com *@descriptions : This program explain the function and use of int size(). This function used to to return number of element in the stack */ import java.io.*; import java.util.*; public class StackSize { public...