Java: Enter personal information with the keyboard and output

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.