본문 바로가기
Studynote/Computer Science 12

14.11.10.mon

by e.sunie 2018. 11. 5.

과제 : p555의 2.5절 StringTokenizer를 알아야한다

토큰: 하나의 의미가 있는 단위의 요소

2+3*5 -> 5개의 토큰으로 구성

 

return valst.pop();

peek: 값을 리턴해주는 함수 but 빼지는 않는다

 

 

 import java.util.*;
class Ex11Token 
{
 public static void main(String[] args) 
 {
  String expression ="3*4*5";
  StringTokenizer st = new StringTokenizer(expression,"+-*/",ture);
  while(st.hasMoreTokens()){
  System.out.println(st.nextTooken();  
  }
  //System.out.println(st.nec
 }

 

 

chapter 13 aWT와 애플릿

 

1

 

2.AWT의 주요 컴포넌트

 

 

 

 

 

 

 

 

 

'Studynote > Computer Science 12' 카테고리의 다른 글

14.11.17 13장 awt와 애플릿  (0) 2018.11.05
14.11.11.Tue  (0) 2018.11.05
chapter 11 Map  (0) 2018.11.05
10.14.Tue  (0) 2018.11.05
6.추상클래스  (0) 2018.11.05

댓글