3:57 am - Monday February 20, 2017

Tag Archives: Collection

HashSet example program for Object[] toArray()

/** *@author:candidjava.com *@description: HashSet example program for Object[] to Array() */ import java.util.HashSet; public class HashSetObjectToArray { public static void main(String[] args) { HashSet hSet = new...

HashSet example program for boolean retainAll(Collection c)

/** *@author:candidjava.com *@description:Hashset example program for boolean retainAll(Collection c) */ import java.util.HashSet; public class HashSetRetainAll { public static void main(String[] args) { HashSet hs1...

HashSet example program for boolean addAll(Collection c)

/** @Description : HashSet example program for boolean contains(Object o) @Author : candidjava.com */ import java.util.HashSet; public class hshst { public static void main(String[] args) { HashSet myset = new HashSet(); myset.add("Learning"); myset.add("Easy"); myset.add("Simply"); boolean...

HashSet example program for Iterator iterator()

/** *@author:candidjava.com *@description:HastSet example program for Iterator iterator() */ import java.util.HashSet; import java.util.Iterator; public class HastSetIterator { public static void main(String args[])...

HashSet example program for boolean isEmpty()

/** @Description : HashSet example program for boolean isEmpty() @Author : candidjava.com */ import java.util.HashSet; public class hshst { public static void main(String[] arg) { HashSet newset = new HashSet(); newset.add("Hai"); newset.add("idiot"); newset.add("Bye"); boolean...

HashSet example program for Object clone()

/** *@author:candidjava.com *@description:Hashset example program for Object Clone() */ import java.util.HashSet; public class HashSetClone { public static void main(String args[]) { HashSet newset = new HashSet(); //...

FileOutputStream example program for write(int b) () in java

/** *@author: candidjava *@description: FileOutputStream example program for write(int b)() in java **/ import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; public class FileOutputStreamDemo1...

FileOutputStream example program for getFD() () in java

/** *@author: candidjava *@description: FileOutputStream example program for getFD()() in JAVA **/ import java.io.FileDescriptor; import java.io.FileOutputStream; import java.io.IOException; public class FileOutputStreamDemo...

FileInputStream example program for close() in java

/** @program : FileInputStream example program for close() in java @author : "candid" @date : 29.10.12 */ import java.io.FileInputStream; import java.io.IOException; public class FISDemo { public static void main(String[]...

FileInputStream example program for available() in java

/** * @author : candidjava * task : FileInputStream example program for available() in java */ import java.io.FileInputStream; class FIStream { public static void main(String[] args) { try { FileInputStream fi = new FileInputStream("sample.txt");//...

FileInputStream

FileInputStream example program for available() in java FileInputStream example program for close() in java FileInputStream example program for skip(long n) in java BACK

BufferedInputStream example program for skip(long n) in java

/** program : BufferedInputStream example program for skip(long n) in java author : "candid" date : 21.11.12 */ //java code import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.FilterInputStream; import...

BufferedInputStream example program for reset() in java

/** * @author: candidjava * @description: in JAVA example program for */ import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; public class BufferedInputStreamDemo...

BufferedInputStream example program for close() in java

/** * @author candidjava * @description:BufferedInputStream example program for close() in java */ import java.io.File; import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.FileNotFoundException; import...

BufferedInputStream example program for available() in java

/** * @author candidjava * @description:BufferedInputStream example program for available() in java */ import java.io.FileWriter; import java.io.BufferedWriter; import java.io.FileInputStream; import java.io.BufferedInputStream; import...

BufferedOutputStream example program for write(int b) in java

/** * @description: BufferedOutputStream example program for write(int b) in java */ import java.io.FileOutputStream; import java.io.BufferedOutputStream; import java.io.IOException; import java.io.FileNotFoundException; public...

Calendar in java example program setTimeInMillis(long millis)

/** @author:candidjava.com @description:Calendar in java example program setTimeInMillis(long millis) */ import java.util.Calendar; public class SetTime { public static void main(String args[]) { Calendar c = Calendar.getInstance(); System.out.println(c.getTime()); c.setTimeInMillis(6000); System.out.println("after...

Calendar in java example program setFirstDayOfWeek(int value)

/** *@author:candidjava.com *@description: Calender in java example program setFirstDayOfWeek(int value); */ import java.util.Calendar; public class CalendarSetFirstDayOfWeek { public static void main(String[] args) { Calendar...

Calendar in java example program set(int year, int month, int date, int hour, int minute, int second)

/** *@author:candidjava.com *@description: Calender in java example program set(int year,int month,int date,int hour,int minute,int second) */ import java.util.Calendar; public class CalendarSet { public static void main(String[]...

Calendar in java example program hashCode()

/** @author:candidjava.com @description:calendar  in java example program hashCode() */ import java.util.Calendar; public class HashCode { public static void main(String args[]) { // create a calendar Calendar calen = Calendar.getInstance(); //...