[java 프로그램] stack
- 최초 등록일
- 2002.10.21
- 최종 저작일
- 2002.10
- 2페이지/ 압축파일
- 가격 1,000원
컴파일 실행환경
java로 구현한 stack입니다.
본문내용
import java.io.*;
class Start
{
//전역변수로 선언함..
static int beforeInstruction=0; //전 연산자의 우선순위 값 저장..
static int o=0, top=0, i=0, max=100;
//'o'=>출력 count | 'top'=>stack의 top값 | 'i'=>(중요한의미)가로를 처리하기위해 parenthesis함수를 호출시, 호출한 함수와 입력값이 같이 증가
//'max'=>최대값 지정..
static String in; //콘솔상에서 문자열 입력을 받기 위한 전역변수
static String input[]=new String[max]; //콘솔상에서 입력받은 값을 한문자씩 'input[]' 에 저장..
static int inputInt[]=new int[max]; //할당한 문자의 우선순위 부여해서.. 저장할 배열
static String stack[]=new String[max]; //연산자가 들어갈.. 'stack'.. LIFO..
static String output[]=new String[max]; //출력을 담을 배열..
public static void main(String args[])
{
String exit="exit";
boolean a=true;
압축파일 내 파일목록
Data
Start.class
Start.java
참고 자료
없음