SeungHyun Lee
homeprojectsaboutblogtalkscontact
← blog

Java - Lecture3 - practice2

2022.01.24Java#Java

증가 및 감소 연산자

다음과 같은 코드의 출력값을 생각해 보세요.

package lecture3;

public class practice2 {
	public static void main(String[] args) {
		int x=3, y=5;
		y=x++;
		System.out.println("x="+x+"\t y="+y);
	}
}

Answer

x=4	 y=3
이전 글Java - Lecture3 - practice1다음 글Java - Lecture3 - practice3

SeungHyun Lee

Frontend Developer

Navigation

  • Home
  • Projects
  • About
  • Blog
  • Talks
  • Contact

Connect

  • GitHub
  • Email

© 2026 SeungHyun Lee. All rights reserved.