12:06 am - Monday June 25, 2018

Tag Archives: for

Character Example Program for isDefined(char ch)

/** * 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 log10(double a)

//Example Program to find log10(double a) value /** * @author:Candidjava.com * @description:used for to Returns the base 10 logarithm of a double value */ public class Log10 { public static void main(String[] args) { double i...

Hashtable Example program for get(Object key)

/** Author :candidjava.com Description: Returns the value to which the specified key is mapped in this hashtable. */ import java.util.*; import java.util.Hashtable; import java.io.IOException; public class HashtableGetExample { public...

LinkedList Example Program for contains(Object o)

/** Author :candidjava.com Description: It will return the hashcode value of the object which we creates. */ import java.io.IOException; import java.util.*; public class LinkedListContainExample { public static void main(String...

LinkedList Example Program for clear()

/** Author :candidjava.com Description: To calculate the current capacity of the string by using capacity() method it returns the current capacity of the String */ import java.io.IOException; import java.util.*; import java.io.IOException; public...

LinkedList Example Program for addLast(E e)

/** Author :candidjava.com Description: Appends the specified element to the end of this list. */ import java.io.IOException; import java.util.*; import java.io.IOException; public class LinkedlistAddLast { public static void main(String...

LinkedList Example Program for addFirst(E e)

/** Author :candidjava.com Description: To Inserts the specified element at the beginning of this list. */ import java.io.IOException; import java.util.*; import java.io.IOException; public class LinkedListAddFirst { public static...

LinkedList Example Program for add(int index, E element)

/** Author :candidjava.com Description: Inserts the specified element at the specified position in this list. */ import java.io.IOException; import java.util.*; import java.io.IOException; public class LinkedlistAddExample2 { public...

LinkedList Example Program for add(E e)

/** @Author :candidjava.com @Description: To appends the specified element to the end of this list. */ import java.io.IOException; import java.util.*; public class LinkedlistAddExample { public static void main(String args[]) { boolean...

Vector Example Program for setSize(int newSize)

/** @author: candidjava @description: setSize(int newSize) is used to Sets the size of this vector. */ import java.util.*; public class DeeSetSizeVector { public static void main(String[] args) { Vector v = new Vector();// create...

Vector Example Program for setElementAt(E obj,int index)

/** @author: candidjava @description: setElementAt(E obj,int index) is used to Sets the component at the specified index of this vector to be the specified object. */ import java.util.*; public class DeeSetElementsVector { public...

Vector Example Program for set(int index,E element)

/** @author: candidjava @description: set(int index,E element) is used to Replaces the element at the specified position in this Vector with the specified element. */ import java.util.*; public class DeeSetVector { public static...

Vector Example Program for retainAll(Collection c)

/** @author: candidjava @description: retainAll(Collection c)is used to Retains only the elements in this Vector that are contained in the specified Collection. */ import java.util.*; public class DeeRetainAllVector { public static...

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

/** @author: candidjava @description: removeRange(int fromIndex,int toIndex) is used to Removes from this List all of the elements whose index is between fromIndex, inclusive and toIndex, exclusive. */ import java.util.*; public class...

Vector Example Program for removeElementAt(int index)

/** @author: candidjava @description: removeElementAt(int index) is used to Deletes the component at the specified index and return new elements */ import java.util.*; public class DeeRemoveElementAtVector { public static void main(String[]...

Vector Example Program for removeAllElements()

/** @author: candidjava @description: removeAllElements() is used to Removes all components from this vector and sets its size to zero. */ import java.util.*; public class DeeVectorRemoveAllElements { public static void main(String[]...

Java Example Program for Hello World

//java example program for hello world /** @author:candidjava.com @description:java example program for hello world */ public class HelloWorld { public static void main(String args[]) { System.out.print("Hello world");//...

Java Example program for Addition

//Java Example program for Addition /** @author:candidjava.com @description:program for Addition of two numbers */ public class Addition { public static void main(String args[]) { int a,b,c; a=35;//input of first value System.out.println("enter...

Java Example Program to print numbers in Descending order

//Java Example Program to print numbers in Descending order /** @author:candidjava.com @description:Program to print numbers in Descending order */ public class Descending { public static void main(String args[]) { int n=10;// take...

Java Example Program to Print the numbers in Ascending Numbers

//Java Example Program to Print the numbers in Ascending Numbers /** @author:candidjava.com @description:Program to Print the numbers in Ascending Numbers */ public class Ascending { public static void main(String args[]) { int n=10;//...