Ch 2 Flashcards
<p>What is a pixel?</p>
<p>A unit of illumination on the screen.</p>
<p>What is a compile-time error?</p>
<p>An error that will affect the compilation and correct running of the file</p>
<p>How do you create text?</p>
<p>g.drawString ("Hello World, 100, 200);</p>
<p>Run-time error</p>
<p>error that occurs during the execution of a program</p>
<p>Syntax</p>
<p>syntax of a computer language is the set of rules that defines the combinations of symbols that are considered to be a correctly structured document or fragment in that language</p>
<p>Semantics</p>
<p>semantics is the field concerned with the rigorous mathematical study of the meaning of programming languages
</p>
<p>True or False: Java is not case-sensitive.</p>
<p>False</p>
<p>What starts with uppercase letter?</p>
<p>Packages, Files, Classes</p>
<p>What starts with a lowercase letter?</p>
<p>methods, objects, variables</p>
<p>What does init stand for?</p>
<p>Initialization</p>
Soft returns vs. hard returns
soft=computer generated
hard=clicking the enter key
Which symbols must have matches?
() {} [] “” ‘’
Which is correct: my Method myMethod MyMethod My Method
myMethod
What is the middle preprocessor directive?
import java.applet.*;
in this method:
g.drawString (“sup”, 1,1)
What is the dot?
a method selection operator
What two types of data does Java work with?
Primitive and Objects
What is special about primitive data
It can’t be broken down any further
How to set a background color
setBackground(Color.blue);
How to set a size
setSize(1900, 1000);
How to make arc
g.drawArc (100, 200, 300, 400, 270, 90);
How to make filled in arc
g.fillArc (100, 200, 300, 400, 270, 90);
In this command:
g.fillArc (100, 200, 300, 400, 270, 90);
What does 270 mean?
Start arc
In the command:
g.fillArc (100, 200, 300, 400, 270, 90);
What does 90 mean?
End arc
public is a ________
visibility modifier