Skip to main content\(\def\fontCDT{\fontsize{7.5}\selectfont}
\renewcommand{\thetable}{A.\arabic{table}}
\def\fontCDTsmall{\fontsize{7.25}\selectfont}
\renewcommand{\thefigure}{A--\arabic{figure}}
\def\fontCDTsmallsmall{\fontsize{7}\selectfont}
\renewcommand{\thetable}{B.\arabic{table}}
\def\fontCDTsmallsmallsmall{\fontsize{6.5}\selectfont}
\renewcommand{\thefigure}{B--\arabic{figure}}
\def\fontCOBH{\fontsize{12}\selectfont}
\renewcommand{\thetable}{C.\arabic{table}}
\def\fontCOLN{\fontsize{11}\selectfont}
\renewcommand{\thefigure}{C--\arabic{figure}}
\def\fontBOXfive{\fontsize{15}\selectfont}
\renewcommand{\thetable}{D.\arabic{table}}
\def\fontboxoneh{\fontsize{10}\selectfont}
\renewcommand{\thefigure}{D--\arabic{figure}}
\def\fontUNTBCH{\fontsize{9}\selectfont}
\renewcommand{\thetable}{E.\arabic{table}}
\def\fontTBCDT{\fontsize{7.5}\selectfont}
\renewcommand{\thefigure}{E--\arabic{figure}}
\def\fontTBCH{\fontsize{9}\selectfont}
\renewcommand{\thetable}{F.\arabic{table}}
\def\fontTITLE{\fontsize{24}\selectfont}
\renewcommand{\thefigure}{F--\arabic{figure}}
\def\fontSMH{\fontsize{13}\selectfont}
\renewcommand{\thetable}{G.\arabic{table}}
\def\fontKTH{\fontsize{11}\selectfont}
\renewcommand{\thefigure}{G--\arabic{figure}}
\def\fontEXRN{\fontsize{9}\selectfont}
\renewcommand{\thetable}{H.\arabic{table}}
\def\fontCDT{\fontsize{7.5}\selectfont}
\renewcommand{\thefigure}{H--\arabic{figure}}
\def\fontCDTsmall{\fontsize{7.25}\selectfont}
\def\fontCDTsmallsmall{\fontsize{7}\selectfont}
\def\fontCDTsmallsmallsmall{\fontsize{6.5}\selectfont}
\def\fontBXsixBTH{\fontsize{18}\selectfont}
\def\ttHtwo{\fontsize{9}\selectfont}
\def\RHright#1{}
\def\RHrightsec#1#2{}
\newcommand{\captionmargin}[1]{
\vspace{0pt}\protect{\rule[12pt]{12.5pc}{0.5pt}
\small FIGURE \thefigure}
\quad\small#1}
\def\figaleftscaled#1#2#3#4{
\parbox[t]{12.5pc}{
\protect\vspace{-8pt}\caption{#3 }\label{#4}
}
\protect\parbox[t]{27pc}{ \protect\vfill\psfig{file=../#1,scale=#2}
} } \def\splarge{\fontdimen2\font=1.3\fontdimen2\font} \def\spstrict{\fontdimen2\font=0.7\fontdimen2\font} \def\spnormalstr{\fontdimen2\font=1.429\fontdimen2\font} \def\spnormallar{\fontdimen2\font=0.7693\fontdimen2\font}
\def\TBT#1#2{\small {
TABLE\ \thetable}
#2\hfill\}
\def\TBCH#1{\fontTBCH#1}
\def\TBCDT#1{\fontTBCDT#1}
\def\UNTB{}
\def\BOXDT#1{
\vspace{9pt plus7pt minus4pt}\fboxrule=0.5pt \fboxsep=6pt\fbox{\parbox{26pc}{#1}
}
\vspace{12pt plus8pt minus4pt}}
\def\BOXtwo#1#2{
\vspace{7pt plus7pt minus4pt} \fboxrule=0.5pt \fboxsep=6pt \psfig{file=../commonart/bx1_dg.eps}
\vspace{-32pt}
\fbox{\parbox{26pc}{\vspace{-6pt}
{\rule[-3pt]{10.8pc}{15pt}}
\vspace{-12pt}
{
JAVA\,\,LANGUAGE\,\,RULE}
{
#1}#2}
}
\vspace{12pt plus10pt minus4pt}}
\def\BOXtwoleft#1#2{
\vspace{7pt plus7pt minus4pt} \fboxrule=0.5pt \fboxsep=6pt \psfig{file=../commonart/bx1_dg.eps}
\vspace{-32pt}
\fbox{\parbox{26pc}{\vspace{-6pt}
{\rule[-3pt]{10.8pc}{15pt}}
\vspace{-12pt}
{
JAVA\,\,LANGUAGE\,\,RULE}
{
#1}#2}
}
\vspace{12pt plus10pt minus4pt}}
\def\BOXfive#1#2#3#4{
{\rule[0pt]{40.5pc}{2pt}}\
\parbox{40.5pc}{
\parbox[t]{11.5pc}{
#1\\
{\rule[0pt]{11.5pc}{1pt}}\\ \epsfig{file=#2}\\\small#3
}
\parbox[t]{26pc}{#4
}}}
\def\tBOXseven#1{{
\uppercase{#1}}}
\def\BOXfiveleft#1#2#3#4{
{
\rule[0pt]{40.5pc}{2pt}}\
\\
\parbox{40.5pc}{
\parbox[t]{11.5pc}{
#1\\
{
\rule[0pt]{11.5pc}{1pt}}\\\\\small#3
}
\parbox[t]{26pc}{#4
}}}
\newcommand{\secBXsixBTH}[1]{}
\newcommand{\secBXsixHtwo}[1]{\vspace{11pt plus7pt minus4pt}{#1}
\vspace{3pt plus3pt minus1pt}}
\newcommand{\secEXRHtwo}[1]{}
\newcommand{\appendixleft}[2]{}
\newcommand{\appendixright}[2]{}
\newcommand{\chaptermark}[1]{}
\newcommand{\sectionmark}[1]{}
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Chapter 1 Java Program Design and Development
Objectives
Know the basic steps involved in program development.
Understand some of the basic elements of the Java language.
Know how to use simple output operations in a Java program.
Be able to distinguish between different types of errors in a program.
Understand how a Java program is translated into machine language.
Understand the difference between a Java console application and a Java Swing application.
Know how to edit, compile, and run Java programs.