Object.toString()

우선 아래 자바코드를 보자. 이 자바코드는 간단하게 랜덤 덱을 생성하고, 덱에서 랜덤 카드를 뽑는 기능을 하고 있습니다. 이 코드를 실행하고 보면 이러한 결과가 나옵니다 Card2@6bc7c054 class Card2{ static int typeNumber = 2; static int MaxNumber = 10; static String[] types = {"Spade","Heart","Diamond"}; private String Shape; private int Number; Card2(String Shape, int Number){ this.Shape =Shape; this.Number = Number; } Card2(){ this(types[(int)(Math.random() * typeNumb..
Hoplin
'Object.toString()' 태그의 글 목록