4:02 am - Monday January 21, 2019

Author Archives: Mathan Lal

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

BufferedInputStream

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

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

BufferedOutputStream

BufferedOutputStream example program for write(int b) in java   BACK

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 get Instance(TimeZone zone, Locale aLocale)

/** *@author:candidjava.com *@description: Calender in java example program getInstance(TimeZone zone,Locale aLocale) */ import java.util.Calendar; import java.util.Locale; import java.util.TimeZone; public class CalendarGetInstance { public...

Calendar in java example program getLeastMaximum(int field)

/** *@author: candidjava *@description: Calendar in java example program getLeastMaximum(int field) **/ import java.util.Calendar; public class CalendarDemo { public static void main(String[] args) { // create a calendar Calendar...

Calendar in java example program get(int field)

/** *@author: candidjava *@description: Collections in JAVA example program for get(int field) **/ import java.util.Calendar; public class CalendarDemo { public static void main(String[] args) throws Exception { // create...

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

Calendar in java example program computeTime()

/** @author: candidjava @description: Calendar in JAVA example program for computeTime() */ import java.util.Calendar; import java.util.GregorianCalendar; public class CalendarDemo extends GregorianCalendar { public static void...

Calendar in java example program clear()

/** *@author:candidjava &@description:Calendar in java example program for clear() **/ import java.util.Calendar; public class CalendarClear { public static void main(String[] args) { // create calendar object Calendar cal...

Date in java example program for compareTo(Date anotherDate)

/** *@author:candidjava *@description:Date in java example program for compareTo(Dateanother Date) **/ import java.util.Date; public class Compare { public static void main(String[] args) { // create two dates Date date = new Date(86,...

Calendar Example Programs

Calendar in java example program add(int field, int amount) _____________________________________________________________________________________________________________________ Calendar in java example program clear() _____________________________________________________________________________________________________________________ Calendar...

Calendar in java example program add(int field, int amount)

/** *@author:candidjava *@description:Calendar in java example program add(int field, int amount) **/ import java.util.Calendar; public class CalendarAdd { public static void main(String[] args) { // create a calendar Calendar...

Date in java example program for set Time(long time)

/** @author:candidjava @description:Date in java example program for setTime(long time) */ import java.util.Date; public class MyClass { public static void main(String[] args) { Date d=new Date(); d.setTime(-1332403); System.out.println(d); } } Output: Thu...