Software Development/Java

Java 자바 개요

루ㅌ 2020. 4. 18. 21:24

The Java "White Paper" Buzzwords

 

Simple

Object-Oriented

Network-Savvy

Robust

Secure

Architecture-Neutral

Portable

Interpreted

High-Performance

Dynamic

 

Development Environment

Command-Line Tools

javac

java

 

Intergrated Development Environment

Eclipse

 

A Simple Java Program

 

public class Hello {

    public static void main(String[] args) {

        System.out.println("Hello World!");

   }

}

 

Constants 

 

final 

 

public class Hello {

    public static final double aaa = 1;

    public static void main(String[] args) {

        final double CM_PER_INCH = 2.54;

        System.out.println("Hello World!");

   }

}

 

Arrays

 

int[] a;

int[] a = new int[100];

for(int i = 0; i < 100; i++)

    a[i] = i;

String[] names = new String[10];

for (int i = 0; i < 10; i++)

    names[i] ="";

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

    System.out.println(a[i]);