tostring 썸네일형 리스트형 toString toString 예제 class Car{ String model; String company; public Car(String model, String company) { super(); this.model = model; this.company = company; } @Override public String toString() { return "Car [model=" + model + ", company=" + company + "]"; } } public class ToStringTest { public static void main(String[] args) { Car c1 = new Car("K7", "현대차"); Car c2 = new Car("아반테", "기아차"); System.out.pr.. 더보기 이전 1 다음