8:24 pm - Wednesday October 18, 2017

Tag Archives: samplecode

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[]...

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 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(); //...

Calendar in java example program getTimeInMillis()

/** *@author: candidjava *@description: Calendar in java example program for getTimeInMillis() **/ import java.util.Calendar; public class CalendarDem { public static void main(String[] args) throws InterruptedException { // create...

Calendar in java example program getMaximum(int field)

/* @author:candidjava.com @description:  Program that Returns the maximum value for the given calendar field of this Calendar instance. */ import java.util.Calendar; public class CalendarMax { void Max_Calendar() { Calendar c = Calendar.getInstance();...

Calendar in java example program equals(Object obj)

/** *@author:candidjava *@description:Date in java example program for equals(Object obj) **/ import java.util.Date; public class Equals { public static void main(String[] args) { Date date = new Date(55, 6, 30); Date date2 = new...