글번호
49608

13주차_자바_하트3

작성자
김영준
작성일
2019.05.28.
수정일
2019.05.28.
조회수
263

class Friend {

void run( ) {

System.out.print("달린다"); }

void eat( ) {

System.out.print("먹는다"); }

void sleep( ) {

System.out.print("잔다"); }

voidstudy( ) {

System.out.print("공부"); }

void play( ) {

System.out.print("논다"); }

void talk( ) {

System.out.print("말한다"); } }

 

class 3 {

public static void main(String args[ ] ) { Friend friend = new Friend( );

friend.run( ); friend.eat( );

friend.sleep( ); friend.study( );

friend.play( );

friend.talk( ); } }

 

첨부파일
첨부파일이(가) 없습니다.