<Git> Increment01.java
·
console.log("What ? " + Cord);/Java
package ch01_variable_operator; public class Increment01 { public static void main(String[] args) { // = 기호는 대입(assign) 연산자입니다. int x = 5 ; // 변수 x를 정의한 다음, 5를 대입(writer)합니다. //x = x + 3 ; // 누적 x += 3 ; // 누적 System.out.println("x : " + x); x *= 4 ; System.out.println("x : " + x); x %= 5 ; System.out.println("x : " + x); x -= 1 ; System.out.println("x : " + x); x += 7 ; System.out.println("x : ..
<Git>MyBox.java
·
console.log("What ? " + Cord);/Java
package ch01_variable_operator; public class MyBox { public static void main(String[] args) { double width ; double height ; double area ; double perimeter ; width = 10.0 ; height = 5.0 ; area = width * height ; perimeter = 2 * (width+height) ; System.out.println("사각형 넓이 :" +area); System.out.println("사각형 둘레 :" +perimeter); } }
<Git> ErrorDebug.java
·
console.log("What ? " + Cord);/Java
package ch01_variable_operator; public class ErrorDebug { public static void main(String[] args) { int a,b,c ; a = 21 ; b = 7 ; c = a+b ; System.out.println("a+b = " +c); c = a-b ; System.out.println("a-b =" + c); c = a/b; System.out.println("a/b =" +c); } } cf) Myjava/ErrorDebug.java at master · nolooker/Myjava (github.com)