Familiarity of experimental 1:java development environment

Source: Internet
Author: User

A Experimental content

1. Compiling and running a simple Java program using the JDK

2. Edit, compile, run, and debug Java programs using Eclipse

3. Implement the arithmetic and test.

Two Experimental knowledge points

1. Installation location and difference of JVM, JRE, JDK;

2. command line run JAVAC,JAVA;JAVAC-CP; JAVA-CP;

3. Path,classpath,sourcepath setting method and application;

4. Package management: package;import;javac-d;

5. Eclipse (Netbeans) manages Java projects, debugging: breakpoints, stepping, etc.;

6. Java basic syntax: type and type conversion; variables; operators; Process control, etc.;

7. Use of JDK help documentation;

Three Experiment

1. Caesar

Import java.io.*;

Import Java.util.Scanner;

public class Kaiser {

public static void Main (string[] args) {

System.out.println ("Please enter key:");

Scanner s = new Scanner (system.in);

int a = S.nextint ();

C (a); }

public static void C (int n) {

try{

Char b[];

BufferedReader Br2 = new BufferedReader (new InputStreamReader (system.in));

System.out.println ("Please enter a clear text:");

String Str2=br2.readline ();

B=str2.tochararray ();

System.out.println ("ciphertext:");

int k=n;

for (int i=0;i<str2.length (); i++) {

Char ch= (char) ((b[i]-' a ' +k)%26+ ' a ');

System.out.print (CH);

}

System.out.println ("\ n key k=" +k);

}

catch (IOException e) {

System.out.println (E.getmessage ());

}

}

}

Iv. Summary of the experiment

This experiment is mainly used by scanner, it can let the user enter the key from the keyboard, clear text, the screen will appear ciphertext, to reach the user requirements.

Familiarity of experimental 1:java development environment

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.