with 명령 (with statement) > JAVA Tip

본문 바로가기
사이트 내 전체검색

JAVA Tip

with 명령 (with statement)

페이지 정보

본문

반복되는 명령의 default 를 미리 설정한다.

무법 :
  with (object){
      statements
  }
      object      반복 수행 할 object
      statements  일련의 명령문

설명 : with 대신에 긴 object names 혹은 this. keywords 을 사용 할 수도 있다.

예제: 반복되는  Math.object
  radius = 5.4
  area = Math.PI * (radius*radius)
  cosinePI = Math.cos(Math.PI/2)
  sinePIdiv2 = Math.sin(Math.PI/2)

대신에
  radius = 5.4
  with (Math) {
      area = PI * (radius*radius)
      cosinePI = cos(PI/2)
      sinePIdiv2 = sin(PI/2)}

댓글목록

등록된 댓글이 없습니다.

Total 101건 6 페이지
JAVA Tip 목록
번호 제목 글쓴이 조회 날짜
21 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 1395 06-29
20 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 2074 06-27
19 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 5174 06-27
18 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 1414 06-27
17 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 2372 06-27
16 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 2202 06-27
15 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 2598 06-27
14 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 4951 06-27
13 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 1529 06-27
열람중 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 1291 03-24
11 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 2706 03-24
10 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 1433 10-11
9 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 2106 10-11
8 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 1805 10-11
7 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 1597 10-11
6 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 1323 10-11

검색

회원로그인

회원가입

사이트 정보

컴퓨터 정보,윈도우즈,리눅스,포토샵,3ds
맥스,프로그래밍 강좌팁

접속자집계

오늘
745
어제
724
최대
5,287
전체
637,744
Copyright © www.qdata.co.kr All rights reserved.