22

Variable & IF, Method

Embed Size (px)

Citation preview

Page 1: Variable & IF, Method

변수,����������� ������������������  If,����������� ������������������  MethodObject����������� ������������������  Oriented����������� ������������������  Programming,����������� ������������������   3rd Class

2015.09.17. 경민기

Page 2: Variable & IF, Method

압축을하지않은 영상데이터는 1초에 4기가바이트를 사용합니다.

이러한대용량 데이터를처리하려면, 잠시 기억을담당할무언가가 필요합니다.

RedOne

변수

Page 3: Variable & IF, Method

CPU는 변수사용에대한통계를내

부적으로수행합니다.

그리고제한적으로 사용자들이동작

시킬애플리케이션의 미래를예측해

서, 미리 작업을 해둡니다.

여러분이아무것도 하지않아도.

분기 예측

Page 4: Variable & IF, Method

변수 Variable변수는도대체무엇인가?

Page 5: Variable & IF, Method

수학세계의변수 프로그래밍세계의변수

수학에서의 변수는 ‘변화할수없는것’

프로그래밍에서 변수는 ‘변화 가능한것’

변수란?

Page 6: Variable & IF, Method

데이터타입 설명 기본값

byte 8-bit����������� ������������������   signed����������� ������������������  two's����������� ������������������  complement����������� ������������������  integer 0

short 16-bit����������� ������������������   signed����������� ������������������  two's����������� ������������������  complement����������� ������������������  integer 0

int 32-bit����������� ������������������   signed����������� ������������������  two's����������� ������������������  complement����������� ������������������  integer 0

long 64-bit����������� ������������������   two's����������� ������������������  complement����������� ������������������  integer 0L

float single-precision����������� ������������������   32-bit����������� ������������������   IEEE����������� ������������������  754����������� ������������������  floating����������� ������������������  point 0.0f

double double-precision����������� ������������������   64-bit����������� ������������������   IEEE����������� ������������������  754����������� ������������������   floating����������� ������������������  point 0.0d

char single����������� ������������������  16-bit����������� ������������������  Unicode����������� ������������������  character '\u0000'

String����������� ������������������  (or����������� ������������������  any����������� ������������������  object)����������� ������������������  

Set of����������� ������������������  char null

boolean two����������� ������������������  possible����������� ������������������   values: true and false false

하나의값을저장할 수있다.

Variables����������� ������������������  in����������� ������������������  Java

• (선언시) 변수타입변수이름;• 대소문자구분함, 숫사로시작 X,����������� ������������������  예약어 사용하면안됨• 특수문자는 _����������� ������������������  또는 $만 가능

Page 7: Variable & IF, Method

File����������� ������������������  >����������� ������������������  New����������� ������������������  >����������� ������������������  Java����������� ������������������  Project:����������� ������������������  “ShowVariable”

File����������� ������������������  >����������� ������������������  New����������� ������������������  >����������� ������������������  Class:����������� ������������������  “ShowVariable”

Example����������� ������������������  in����������� ������������������  Eclipse

Page 8: Variable & IF, Method

코드 설명

변수 선언

변수 할당

변수 사용

Page 9: Variable & IF, Method

If분기

Page 10: Variable & IF, Method

선택할때쓰입니다

If

http://www-01.ibm.com/support/knowledgecenter/SSCRHV_6.1.1/com.ibm.btools.help.modeler611.collab.publish.doc/doc/concepts/modelelements/decision.html?lang=ko

등록사용자인지 확인 등록되었나?

신규 정보 입력

입력된 데이터 사용

Page 11: Variable & IF, Method

File����������� ������������������  >����������� ������������������  New����������� ������������������  >����������� ������������������  Java����������� ������������������  Project:����������� ������������������  “ExecuteIF”

File����������� ������������������  >����������� ������������������  New����������� ������������������  >����������� ������������������  Class:����������� ������������������  “ExecuteIF”

Example����������� ������������������  in����������� ������������������  Eclipse

Page 12: Variable & IF, Method

코드 설명

Page 13: Variable & IF, Method

MethodDivide����������� ������������������  et impera

Page 14: Variable & IF, Method

Divide����������� ������������������  et����������� ������������������  impera

모든 문제는한번에 다처리하기보단, 나누어서 처리하는기술이필요합니다.

로마 제국이그랬듯이.

Page 15: Variable & IF, Method

File����������� ������������������  >����������� ������������������  New����������� ������������������  >����������� ������������������  Java����������� ������������������  Project:����������� ������������������  “NumberMethods”

File����������� ������������������  >����������� ������������������  New����������� ������������������  >����������� ������������������  Class:����������� ������������������  “NumberMethods”

Example����������� ������������������  in����������� ������������������  Eclipse

Page 16: Variable & IF, Method

코드 설명

Page 17: Variable & IF, Method

Code����������� ������������������  Reading, Part����������� ������������������  1어떻게남의코드를찾는가?

Page 18: Variable & IF, Method

https://wiki.apache.org/nutch/Becoming_A_Nutch_Developer

분석하고 싶은유저 그룹을 찾기

Page 19: Variable & IF, Method

http://svn.apache.org/viewvc/nutch/

코드 리딩:웹 크롤러 Apache����������� ������������������  Nutch

Page 20: Variable & IF, Method

Main����������� ������������������  찾기

Page 21: Variable & IF, Method

Main����������� ������������������  함수찾기

Page 22: Variable & IF, Method

Linux����������� ������������������  Kernel