← Back to feed
Renewal·서른의 생활코딩

ex7) java

NS
normalstory
cover image


public class Test01 {
    // declaration + initialization
private int day =25;
private int month=12;
// output function
public void printTest(){
System.out.print("Global and local variable example: "+month+"/"+day);
}// (just a function)
public static void main(String[] args){
// create an object of the user-defined Test01 class
Test01 myTest=new Test01();
// call printTest() from Test01, which was just a function
myTest.printTest();
}
}

This English version was translated by Codex.

친절한 찰쓰씨
Written by
친절한 찰쓰씨

Pleasant Charles — UI/UX researcher at AIT. Keeping notes on design, planning, and slow days here since 2010.