Package class exercises;
Statement of the package
Import java.util.*; Import all classes of Java.util
/**
- Created by Administrator on 2018/4/17 0017.
*/
/
Enter your CV and export the keyboard
- 2018.4.17
-
V.1
*/
public class showresume{
public static void Main (string[] args)
{
int age=25;//Age
String name= "Chen Jiakei"; name
int worktime=3;//Working time
String way= "Java";//Technical Direction
String favorite= "basketball";//Hobby
String projectcount= "5"; Number of projects done
Scanner input=new Scanner (system.in); System.out.print ("this classmate"); Enter your CV name=input.next (); System.out.print ("Age is"); Age=input.nextint (); System.out.print ("Number of working years"); Worktime=input.nextint (); System.out.print ("Number of projects done");p rojectcount=input.next (); System.out.print ("Technical Direction is:"); Way=input.next (); System.out.print ("Hobby is:"); Favorite=input.next (); System.out.println ("-------------------------------------"); Underline System.out.println ("-------------------------------------"); System.out.println ("The name of this classmate:" +name); Output personal CV System.out.println ("Age is" +age); System.out.println ("Worked" +worktime+ "year"); System.out.println ("Done" +projectcount+ "project"); SYSTEM.OUT.PRINTLN ("Technical direction is:" +way); System.out.println ("Hobby is:" +favorite);
}
}
Java: Enter personal information with the keyboard and output