GregorianCalendar
Would you like to make this site your homepage? It's fast and easy...
Yes, Please make this my home page!
/*
Author: ZT
Date : Jul 11,2017
Purpose: Developing Java 2 SE software
Ref : Java Technology
*/
package a.b.c;
import java.util.*;
import java.text.*;
interface X{
}
interface Y{
}
interface Z extends X,Y{
}
abstract class Myabstract{
//abstract void xyz(String x);
void xxx();
void yyy(){
};
} //
class Appl07112017 extends Myabstract implements Z{
public void xxx(){
int r;
}
public void xyz(String names){
System.out.println("Welcome to xyz()");
} // end of xyz() method
public static void main(String args[]){
String welmessage="Welcome Java 2 SE ";
GregorianCalendar gcalendar = new GregorianCalendar();
Date dNow = new Date( );Date date=new Date();
String str = "k";
String dt1=date.toString();int ind=dt1.indexOf("G");
System.out.println(dt1+ " " +ind);System.out.println(gcalendar.get(Calendar.HOUR));
SimpleDateFormat ft =
new SimpleDateFormat ("E yyyy.MM.dd 'at' hh:mm:ss a zzz");
System.out.println("Current Date: " + ft.format(dNow)+ "str"+str);
int h=gcalendar.get(Calendar.HOUR);
if(h<12)
System.out.println("Good Morning ") ;
else
System.out.println("Good After Noon");
for(int i=0;i<5;i++){
switch(h){
case 6 : System.out.println("Good Morning"+" "+i);break;
default: int r;break;
} // end of switch()
} // end of for
} // end of main() method
} // end of class Appl07112017