编程语言的结构

  1. Primitive data types
  2. Arithmetic operators
  3. Assignment operators
  4. Relational operators
  5. Logical operators
  6. switch Statements
  7. loop Statements ( while && do while && for)
  8. if Statements
  9. Console Input || Output
  10. GUI Input Dialog
  11. Message Dialog

Scanner input = new Scanner(System.in);

int intValue = input.nextInt();

long longValue = input.nextLong();

double doubleValue = input.nextDouble();

float floatValue = input.nextFloat();

double doubleValue = input.next();

String string = JOptionPane.showInputDialog(null,“Enter Input”);

int intValue = Integer.parseInt(string);

double doubleValue = Double.parseDouble(string);

JOptionPane.showMessageDialog(null,”Enter input”);

你可能感兴趣的:(编程语言的结构)