일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- property
- 상속
- 설치
- 연산자
- File 클래스
- jsp
- Event
- Java
- list
- 오라클
- spring
- 연락처 프로그램
- String
- GUI
- 데이터베이스
- array
- html
- css
- javaservlet
- 코틀린#클래스#상속
- kotlin #return #jump
- 파일 입출력
- springframework
- JavaScript
- 윈도우 #단축키
- 자바
- Method
- function
- jQuery
- 다형성
- Today
- Total
목록Method (2)
Binary World
- 함수를 이용하여 정보 출력 1234567891011121314151617181920212223242526272829303132333435363738394041JavaScriptJavaScript Method: 객체가 가지고 있는 함수 var output = document.getElementById('output'); // 생성자 함수function Unit(money, gas, ph) { /* property */ this.money = money; this.gas = gas; this.ph = ph; /* method */ this.attack = function(unit) { unit.ph -= 10; output.innerHTML += unit.ph + ' ' }; this.toString =..
*MethodMain02(사칙연산 메소드 생성) public class MethodMain02 { // 메소드 이름: add// 기능: 두 개의 정수를 매개변수로 전달 받아서, 두 정수의 합을 리턴// 리턴 타입: int// 매개변수: int x, int ypublic static int add(int x, int y) {return x + y;} // end add // 메소드 이름: sub// 기능: 정수 두 개를 전달 받아서, 그 차를 리턴// 리턴 타입: int// 매개변수: int x, int ypublic static int sub(int x, int y) {return x - y;} // end sub // 메소드 이름: mul// 기능: 두 개의 실수를 전달 받아서 두 수의 곱을 리턴하는 ..