자격증/정보처리기사
2024. 4. 26.
[정보처리기사] JAVA 기본 간단 정리
JAVA : 기본적인 오버라이딩 정리class Parent{ void printNumbers(){ System.out.println("Parent class:"); for(int i = 1; i = 1; i--){ System.out.print(i + " "); } System.out.println(); }}public class OverridingExample{ public static void main(String[] args){ Parent parent = new Parent(); parent.printNumbers(); Child child = new Child(); ..