SlideShare ist ein Scribd-Unternehmen logo
1 von 4
or you can also search the tutorial on
Select the best answer.
1: The .class extension on a file means that the file
a.contains Java source code.
b.contains HTML.
c.is produced by the Java compiler (javac).
d.contains a machine specific executable image.
2: Which command compiles the Java source code file
Welcome.java?
a.cd Welcome.java
b.javac Welcome.java
c.java Welcome.java
d.compile Welcome.java
3: A(n) ________ enables a program to read data from the
user.
a.printf
b.import declaration
c.Scanner
d.main routine
4: Which of the following is a Scanner method?
a.nextLine
b.nextText
c.nextWord
d.readNext
5: Every Java application is required to have
a. at least one public static method.
b.at least one data member.
c. a String variable which holds the name of the application.
d.a content pane and several GUI components.
6: Which of the following statements about creating arrays
and initializing their elements is false?
a. The new keyword should be used to create an array.
b. When an array is created, the number of elements must be
placed in square brackets following the type of element being
stored.
c. The elements of an array have unknown values just after the
array has been created.
d. A for loop is an excellent way to initialize the elements of
an array.
7: Assume the following class declaration.
class MyClass
{
int a;
String q;
public void firstMethod()
{
int b, ;
* 7;
+ c * a;
}
}
Mark the following statements as TRUE or FALSE.
q is a reference variable which refers to the empty string.
__TRUE___ b and c are local variables. ___TRUE____ a, b,
and c are primitive data types. ___FALSE____ MyClass is a
Java application. ___FALSE____
8: Which statement below could be used to randomly select a
state from an array which contains exactly 50 strings which
are the names of the states?
1 + ( int ) ( Math.random( ) * 49 ); ( int ) ( Math.random( ) *
51 ); ( int ) ( Math.random( ) * 50 ); 1 + ( int ) (
Math.random( ) * 50 );
9: To draw a single line from (0, 15) to (20, 25), call the
method _________ of the Graphics class in the
paintComponent method.
a.drawLine( 0, 15, 20, 25 );
b.drawString( "single line", 0, 15 );
c.drawLine( 0, 15, 20, 10 );
d.drawLine( 15, 0, 25, 20 );
10: In the Java graphics system, coordinate units are
measured in ________.
a.dots
b.pixels
c.points
d.inches
11: Which is a correct way to invoke the static method sqrt of
the Math class?
a.sqrt( 900 );.
b.math.sqrt( 900 );.
c.Math.sqrt( 900 );.
d.Math Math(); math.sqrt( 900 );.
12: When an object is concatenated with a String
a.a compilation error occurs.
b.a runtime error occurs.
c.the object’s toString method is implicitly called to obtain the
String representation of the object.
d.the object’s class name is used.
13: What do the following statements do?
double array[];
double[ 14 ];
a. Creates a double array containing 13 elements.
b.Creates a double array containing 14 elements.
c. Creates a double array containing 15 elements.
d. Declares but does not create a double array.
14: Consider the class below:
public class Test
{
public static void main( String args[] )
{
int a[];
int[ 10 ];
for ( int ; i <a.length; i++ )
a[ i ] = i + 1 * 2;
int ;
for ( int ; i <a.length; i++ )
result += a[ i ];
System.out.printf( "Result is: %dn", result );
} // end main
} // end class Test
The output of this Java program will be
a. Result is: 62
b. Result is: 64
c. Result is: 65
d. Result is: 67
15: Which method call converts the value in
variable stringVariable to an integer?
a. Convert.toInt( stringVariable )
b. Convert.parseInt( stringVariable )
c. Integer.parseInt( stringVariable )
d.Integer.toInt( stringVariable )

Weitere ähnliche Inhalte

Was ist angesagt?

04. constructor & destructor
04. constructor & destructor04. constructor & destructor
04. constructor & destructorHaresh Jaiswal
 
11. Objects and Classes
11. Objects and Classes11. Objects and Classes
11. Objects and ClassesIntro C# Book
 
Types of Constructor in C++
Types of Constructor in C++Types of Constructor in C++
Types of Constructor in C++Bhavik Vashi
 
Intake 38 data access 3
Intake 38 data access 3Intake 38 data access 3
Intake 38 data access 3Mahmoud Ouf
 
Templates presentation
Templates presentationTemplates presentation
Templates presentationmalaybpramanik
 
Java Foundations: Objects and Classes
Java Foundations: Objects and ClassesJava Foundations: Objects and Classes
Java Foundations: Objects and ClassesSvetlin Nakov
 
Functional programming's relentless bug hunter claire
Functional programming's relentless bug hunter  claireFunctional programming's relentless bug hunter  claire
Functional programming's relentless bug hunter claireadamcbaker
 
Java programming lab assignments
Java programming lab assignments Java programming lab assignments
Java programming lab assignments rajni kaushal
 
Computer science ms
Computer science msComputer science ms
Computer science msB Bhuvanesh
 
classes & objects in cpp overview
classes & objects in cpp overviewclasses & objects in cpp overview
classes & objects in cpp overviewgourav kottawar
 
C++ Returning Objects
C++ Returning ObjectsC++ Returning Objects
C++ Returning ObjectsJay Patel
 

Was ist angesagt? (20)

04. constructor & destructor
04. constructor & destructor04. constructor & destructor
04. constructor & destructor
 
11. Objects and Classes
11. Objects and Classes11. Objects and Classes
11. Objects and Classes
 
Types of Constructor in C++
Types of Constructor in C++Types of Constructor in C++
Types of Constructor in C++
 
Constructors and Destructors
Constructors and DestructorsConstructors and Destructors
Constructors and Destructors
 
Algorithms: I
Algorithms: IAlgorithms: I
Algorithms: I
 
Intake 38 data access 3
Intake 38 data access 3Intake 38 data access 3
Intake 38 data access 3
 
Templates presentation
Templates presentationTemplates presentation
Templates presentation
 
Java Foundations: Objects and Classes
Java Foundations: Objects and ClassesJava Foundations: Objects and Classes
Java Foundations: Objects and Classes
 
Functional programming's relentless bug hunter claire
Functional programming's relentless bug hunter  claireFunctional programming's relentless bug hunter  claire
Functional programming's relentless bug hunter claire
 
Intake 38 5 1
Intake 38 5 1Intake 38 5 1
Intake 38 5 1
 
Java programming lab assignments
Java programming lab assignments Java programming lab assignments
Java programming lab assignments
 
Computer science ms
Computer science msComputer science ms
Computer science ms
 
Intake 38 5
Intake 38 5Intake 38 5
Intake 38 5
 
C++ Template
C++ TemplateC++ Template
C++ Template
 
1.2 matlab numerical data
1.2  matlab numerical data1.2  matlab numerical data
1.2 matlab numerical data
 
Intake 37 linq1
Intake 37 linq1Intake 37 linq1
Intake 37 linq1
 
classes & objects in cpp overview
classes & objects in cpp overviewclasses & objects in cpp overview
classes & objects in cpp overview
 
Ds lab handouts
Ds lab handoutsDs lab handouts
Ds lab handouts
 
Templates
TemplatesTemplates
Templates
 
C++ Returning Objects
C++ Returning ObjectsC++ Returning Objects
C++ Returning Objects
 

Andere mochten auch

إصلاح الأفراد والمجتمعات في الإسلام
 إصلاح الأفراد والمجتمعات في الإسلام إصلاح الأفراد والمجتمعات في الإسلام
إصلاح الأفراد والمجتمعات في الإسلامHassan Elagouz
 
Ifan efendi power piont.
Ifan efendi power piont.Ifan efendi power piont.
Ifan efendi power piont.Iffan Effendi
 
Lecture 10-cs648=2013
Lecture 10-cs648=2013Lecture 10-cs648=2013
Lecture 10-cs648=2013Rajiv Omar
 
digi-pack deconstruction
digi-pack deconstructiondigi-pack deconstruction
digi-pack deconstructionAnnabelStreet8
 
Dịch vụ Premium SEO _Cty CSA
Dịch vụ Premium SEO _Cty CSADịch vụ Premium SEO _Cty CSA
Dịch vụ Premium SEO _Cty CSADUNGCSA
 
Handbag hooks-wholesale
Handbag hooks-wholesaleHandbag hooks-wholesale
Handbag hooks-wholesalemybaghanger
 
Jee advanced-2014-paper-1-code-2
Jee advanced-2014-paper-1-code-2Jee advanced-2014-paper-1-code-2
Jee advanced-2014-paper-1-code-2Abhishek Kumar
 
Gw melek politik
Gw melek politikGw melek politik
Gw melek politikChristyYB
 
Республика Цвета - портфолио 2010 г
Республика Цвета - портфолио 2010 гРеспублика Цвета - портфолио 2010 г
Республика Цвета - портфолио 2010 гVictor Chauzov
 
Salud ocupacional copaso
Salud ocupacional copasoSalud ocupacional copaso
Salud ocupacional copasohasbleidyacost
 
Evaluation questionmedia
Evaluation questionmediaEvaluation questionmedia
Evaluation questionmediaSanusia1
 
كيف يحبك الله
كيف يحبك اللهكيف يحبك الله
كيف يحبك اللهHassan Elagouz
 
Tabel comparativ OG 4/2015
Tabel comparativ  OG 4/2015Tabel comparativ  OG 4/2015
Tabel comparativ OG 4/2015Laurentiu Marius
 
بنو إسرائيل ووعد الآخرة لفضيلة الشيخ فوزى محمد أبوزيد
بنو إسرائيل ووعد الآخرة لفضيلة الشيخ فوزى محمد أبوزيد بنو إسرائيل ووعد الآخرة لفضيلة الشيخ فوزى محمد أبوزيد
بنو إسرائيل ووعد الآخرة لفضيلة الشيخ فوزى محمد أبوزيد Hassan Elagouz
 

Andere mochten auch (20)

إصلاح الأفراد والمجتمعات في الإسلام
 إصلاح الأفراد والمجتمعات في الإسلام إصلاح الأفراد والمجتمعات في الإسلام
إصلاح الأفراد والمجتمعات في الإسلام
 
Ifan efendi power piont.
Ifan efendi power piont.Ifan efendi power piont.
Ifan efendi power piont.
 
Lecture 10-cs648=2013
Lecture 10-cs648=2013Lecture 10-cs648=2013
Lecture 10-cs648=2013
 
digi-pack deconstruction
digi-pack deconstructiondigi-pack deconstruction
digi-pack deconstruction
 
Dịch vụ Premium SEO _Cty CSA
Dịch vụ Premium SEO _Cty CSADịch vụ Premium SEO _Cty CSA
Dịch vụ Premium SEO _Cty CSA
 
Handbag hooks-wholesale
Handbag hooks-wholesaleHandbag hooks-wholesale
Handbag hooks-wholesale
 
Lecture 15
Lecture 15Lecture 15
Lecture 15
 
Ghid ANAF
Ghid ANAFGhid ANAF
Ghid ANAF
 
Jee advanced-2014-paper-1-code-2
Jee advanced-2014-paper-1-code-2Jee advanced-2014-paper-1-code-2
Jee advanced-2014-paper-1-code-2
 
Arbulot guillaume
Arbulot guillaumeArbulot guillaume
Arbulot guillaume
 
Gw melek politik
Gw melek politikGw melek politik
Gw melek politik
 
Республика Цвета - портфолио 2010 г
Республика Цвета - портфолио 2010 гРеспублика Цвета - портфолио 2010 г
Республика Цвета - портфолио 2010 г
 
Stages of lung cancer
Stages of lung cancerStages of lung cancer
Stages of lung cancer
 
Obligatii activ indep
Obligatii activ indepObligatii activ indep
Obligatii activ indep
 
Salud ocupacional copaso
Salud ocupacional copasoSalud ocupacional copaso
Salud ocupacional copaso
 
11671 physicspaper1
11671 physicspaper111671 physicspaper1
11671 physicspaper1
 
Evaluation questionmedia
Evaluation questionmediaEvaluation questionmedia
Evaluation questionmedia
 
كيف يحبك الله
كيف يحبك اللهكيف يحبك الله
كيف يحبك الله
 
Tabel comparativ OG 4/2015
Tabel comparativ  OG 4/2015Tabel comparativ  OG 4/2015
Tabel comparativ OG 4/2015
 
بنو إسرائيل ووعد الآخرة لفضيلة الشيخ فوزى محمد أبوزيد
بنو إسرائيل ووعد الآخرة لفضيلة الشيخ فوزى محمد أبوزيد بنو إسرائيل ووعد الآخرة لفضيلة الشيخ فوزى محمد أبوزيد
بنو إسرائيل ووعد الآخرة لفضيلة الشيخ فوزى محمد أبوزيد
 

Ähnlich wie Comp 328 final guide

21: Which method determines if a JRadioButton is selected?
21: Which method determines if a JRadioButton is selected?21: Which method determines if a JRadioButton is selected?
21: Which method determines if a JRadioButton is selected?sukeshsuresh189
 
Comp 328 final guide (devry)
Comp 328 final guide (devry)Comp 328 final guide (devry)
Comp 328 final guide (devry)sukeshsuresh189
 
6: Which of the following statements about creating arrays and initializing t...
6: Which of the following statements about creating arrays and initializing t...6: Which of the following statements about creating arrays and initializing t...
6: Which of the following statements about creating arrays and initializing t...sukeshsuresh189
 
202: When the user clicks a JCheckBox, a(n) occurs.
202: When the user clicks a JCheckBox, a(n) occurs.202: When the user clicks a JCheckBox, a(n) occurs.
202: When the user clicks a JCheckBox, a(n) occurs.sukeshsuresh189
 
3: A(n) ________ enables a program to read data from the user.
3: A(n) ________ enables a program to read data from the user.3: A(n) ________ enables a program to read data from the user.
3: A(n) ________ enables a program to read data from the user.sukeshsuresh189
 
22: The logical relationship between radio buttons is maintained by objects o...
22: The logical relationship between radio buttons is maintained by objects o...22: The logical relationship between radio buttons is maintained by objects o...
22: The logical relationship between radio buttons is maintained by objects o...sukeshsuresh189
 
19: When the user presses Enter in a JTextField, the GUI component generates ...
19: When the user presses Enter in a JTextField, the GUI component generates ...19: When the user presses Enter in a JTextField, the GUI component generates ...
19: When the user presses Enter in a JTextField, the GUI component generates ...sukeshsuresh189
 
5: Every Java application is required to have
5: Every Java application is required to have5: Every Java application is required to have
5: Every Java application is required to havesukeshsuresh189
 
15: Which method call converts the value in variable stringVariable to an int...
15: Which method call converts the value in variable stringVariable to an int...15: Which method call converts the value in variable stringVariable to an int...
15: Which method call converts the value in variable stringVariable to an int...sukeshsuresh189
 
16: Which of the following is the method used to display a dialog box to gath...
16: Which of the following is the method used to display a dialog box to gath...16: Which of the following is the method used to display a dialog box to gath...
16: Which of the following is the method used to display a dialog box to gath...sukeshsuresh189
 
13: What do the following statements do?
13: What do the following statements do?13: What do the following statements do?
13: What do the following statements do?sukeshsuresh189
 
Comp 328 final guide (devry)
Comp 328 final guide (devry)Comp 328 final guide (devry)
Comp 328 final guide (devry)sukeshsuresh189
 
7: Assume the following class declaration.
7: Assume the following class declaration.7: Assume the following class declaration.
7: Assume the following class declaration.sukeshsuresh189
 
8: Which statement below could be used to randomly select a state from an arr...
8: Which statement below could be used to randomly select a state from an arr...8: Which statement below could be used to randomly select a state from an arr...
8: Which statement below could be used to randomly select a state from an arr...sukeshsuresh189
 
11: Which is a correct way to invoke the static method sqrt of the Math class?
11: Which is a correct way to invoke the static method sqrt of the Math class?11: Which is a correct way to invoke the static method sqrt of the Math class?
11: Which is a correct way to invoke the static method sqrt of the Math class?sukeshsuresh189
 
14: Consider the class below:
14: Consider the class below:14: Consider the class below:
14: Consider the class below:sukeshsuresh189
 
18: Which of the following does not generate an event?
18: Which of the following does not generate an event?18: Which of the following does not generate an event?
18: Which of the following does not generate an event?sukeshsuresh189
 
17: provides the basic attributes and behaviors of a window—a title bar at th...
17: provides the basic attributes and behaviors of a window—a title bar at th...17: provides the basic attributes and behaviors of a window—a title bar at th...
17: provides the basic attributes and behaviors of a window—a title bar at th...sukeshsuresh189
 
23: Which layout manager is the default for JPanel?
23: Which layout manager is the default for JPanel?23: Which layout manager is the default for JPanel?
23: Which layout manager is the default for JPanel?sukeshsuresh189
 
1: The .class extension on a file means that the file
1:  The .class extension on a file means that the file1:  The .class extension on a file means that the file
1: The .class extension on a file means that the filesukeshsuresh189
 

Ähnlich wie Comp 328 final guide (20)

21: Which method determines if a JRadioButton is selected?
21: Which method determines if a JRadioButton is selected?21: Which method determines if a JRadioButton is selected?
21: Which method determines if a JRadioButton is selected?
 
Comp 328 final guide (devry)
Comp 328 final guide (devry)Comp 328 final guide (devry)
Comp 328 final guide (devry)
 
6: Which of the following statements about creating arrays and initializing t...
6: Which of the following statements about creating arrays and initializing t...6: Which of the following statements about creating arrays and initializing t...
6: Which of the following statements about creating arrays and initializing t...
 
202: When the user clicks a JCheckBox, a(n) occurs.
202: When the user clicks a JCheckBox, a(n) occurs.202: When the user clicks a JCheckBox, a(n) occurs.
202: When the user clicks a JCheckBox, a(n) occurs.
 
3: A(n) ________ enables a program to read data from the user.
3: A(n) ________ enables a program to read data from the user.3: A(n) ________ enables a program to read data from the user.
3: A(n) ________ enables a program to read data from the user.
 
22: The logical relationship between radio buttons is maintained by objects o...
22: The logical relationship between radio buttons is maintained by objects o...22: The logical relationship between radio buttons is maintained by objects o...
22: The logical relationship between radio buttons is maintained by objects o...
 
19: When the user presses Enter in a JTextField, the GUI component generates ...
19: When the user presses Enter in a JTextField, the GUI component generates ...19: When the user presses Enter in a JTextField, the GUI component generates ...
19: When the user presses Enter in a JTextField, the GUI component generates ...
 
5: Every Java application is required to have
5: Every Java application is required to have5: Every Java application is required to have
5: Every Java application is required to have
 
15: Which method call converts the value in variable stringVariable to an int...
15: Which method call converts the value in variable stringVariable to an int...15: Which method call converts the value in variable stringVariable to an int...
15: Which method call converts the value in variable stringVariable to an int...
 
16: Which of the following is the method used to display a dialog box to gath...
16: Which of the following is the method used to display a dialog box to gath...16: Which of the following is the method used to display a dialog box to gath...
16: Which of the following is the method used to display a dialog box to gath...
 
13: What do the following statements do?
13: What do the following statements do?13: What do the following statements do?
13: What do the following statements do?
 
Comp 328 final guide (devry)
Comp 328 final guide (devry)Comp 328 final guide (devry)
Comp 328 final guide (devry)
 
7: Assume the following class declaration.
7: Assume the following class declaration.7: Assume the following class declaration.
7: Assume the following class declaration.
 
8: Which statement below could be used to randomly select a state from an arr...
8: Which statement below could be used to randomly select a state from an arr...8: Which statement below could be used to randomly select a state from an arr...
8: Which statement below could be used to randomly select a state from an arr...
 
11: Which is a correct way to invoke the static method sqrt of the Math class?
11: Which is a correct way to invoke the static method sqrt of the Math class?11: Which is a correct way to invoke the static method sqrt of the Math class?
11: Which is a correct way to invoke the static method sqrt of the Math class?
 
14: Consider the class below:
14: Consider the class below:14: Consider the class below:
14: Consider the class below:
 
18: Which of the following does not generate an event?
18: Which of the following does not generate an event?18: Which of the following does not generate an event?
18: Which of the following does not generate an event?
 
17: provides the basic attributes and behaviors of a window—a title bar at th...
17: provides the basic attributes and behaviors of a window—a title bar at th...17: provides the basic attributes and behaviors of a window—a title bar at th...
17: provides the basic attributes and behaviors of a window—a title bar at th...
 
23: Which layout manager is the default for JPanel?
23: Which layout manager is the default for JPanel?23: Which layout manager is the default for JPanel?
23: Which layout manager is the default for JPanel?
 
1: The .class extension on a file means that the file
1:  The .class extension on a file means that the file1:  The .class extension on a file means that the file
1: The .class extension on a file means that the file
 

Mehr von krtioplal

Comp 328 week 6 lab 6
Comp 328 week 6 lab 6Comp 328 week 6 lab 6
Comp 328 week 6 lab 6krtioplal
 
Comp 328 week 4 midterm exam
Comp 328 week 4 midterm examComp 328 week 4 midterm exam
Comp 328 week 4 midterm examkrtioplal
 
Comp 328 week 4 lab 4
Comp 328 week 4 lab 4Comp 328 week 4 lab 4
Comp 328 week 4 lab 4krtioplal
 
Comp 328 week 3 lab 3
Comp 328 week 3 lab 3Comp 328 week 3 lab 3
Comp 328 week 3 lab 3krtioplal
 
Comp 328 week 2 lab 2
Comp 328 week 2 lab 2Comp 328 week 2 lab 2
Comp 328 week 2 lab 2krtioplal
 
Comp 328 week 1 lab 1
Comp 328 week 1 lab 1Comp 328 week 1 lab 1
Comp 328 week 1 lab 1krtioplal
 
Comp 328 entire course
Comp 328 entire courseComp 328 entire course
Comp 328 entire coursekrtioplal
 
Comp 328 week 5 lab 5
Comp 328 week 5 lab 5Comp 328 week 5 lab 5
Comp 328 week 5 lab 5krtioplal
 
Abs 200 week 5 dq 1 global issues
Abs 200 week 5 dq 1 global issuesAbs 200 week 5 dq 1 global issues
Abs 200 week 5 dq 1 global issueskrtioplal
 
Abs 200 week 3 step one of final paper
Abs 200 week 3 step one of final paperAbs 200 week 3 step one of final paper
Abs 200 week 3 step one of final paperkrtioplal
 
Abs 200 week 2 dq 1 empowerment
Abs 200 week 2 dq 1 empowermentAbs 200 week 2 dq 1 empowerment
Abs 200 week 2 dq 1 empowermentkrtioplal
 
Abs 200 final guide
Abs 200 final guideAbs 200 final guide
Abs 200 final guidekrtioplal
 

Mehr von krtioplal (12)

Comp 328 week 6 lab 6
Comp 328 week 6 lab 6Comp 328 week 6 lab 6
Comp 328 week 6 lab 6
 
Comp 328 week 4 midterm exam
Comp 328 week 4 midterm examComp 328 week 4 midterm exam
Comp 328 week 4 midterm exam
 
Comp 328 week 4 lab 4
Comp 328 week 4 lab 4Comp 328 week 4 lab 4
Comp 328 week 4 lab 4
 
Comp 328 week 3 lab 3
Comp 328 week 3 lab 3Comp 328 week 3 lab 3
Comp 328 week 3 lab 3
 
Comp 328 week 2 lab 2
Comp 328 week 2 lab 2Comp 328 week 2 lab 2
Comp 328 week 2 lab 2
 
Comp 328 week 1 lab 1
Comp 328 week 1 lab 1Comp 328 week 1 lab 1
Comp 328 week 1 lab 1
 
Comp 328 entire course
Comp 328 entire courseComp 328 entire course
Comp 328 entire course
 
Comp 328 week 5 lab 5
Comp 328 week 5 lab 5Comp 328 week 5 lab 5
Comp 328 week 5 lab 5
 
Abs 200 week 5 dq 1 global issues
Abs 200 week 5 dq 1 global issuesAbs 200 week 5 dq 1 global issues
Abs 200 week 5 dq 1 global issues
 
Abs 200 week 3 step one of final paper
Abs 200 week 3 step one of final paperAbs 200 week 3 step one of final paper
Abs 200 week 3 step one of final paper
 
Abs 200 week 2 dq 1 empowerment
Abs 200 week 2 dq 1 empowermentAbs 200 week 2 dq 1 empowerment
Abs 200 week 2 dq 1 empowerment
 
Abs 200 final guide
Abs 200 final guideAbs 200 final guide
Abs 200 final guide
 

Kürzlich hochgeladen

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 

Kürzlich hochgeladen (20)

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 

Comp 328 final guide

  • 1. or you can also search the tutorial on Select the best answer. 1: The .class extension on a file means that the file a.contains Java source code. b.contains HTML. c.is produced by the Java compiler (javac). d.contains a machine specific executable image. 2: Which command compiles the Java source code file Welcome.java? a.cd Welcome.java b.javac Welcome.java c.java Welcome.java d.compile Welcome.java 3: A(n) ________ enables a program to read data from the user. a.printf b.import declaration c.Scanner d.main routine 4: Which of the following is a Scanner method? a.nextLine b.nextText c.nextWord d.readNext 5: Every Java application is required to have a. at least one public static method.
  • 2. b.at least one data member. c. a String variable which holds the name of the application. d.a content pane and several GUI components. 6: Which of the following statements about creating arrays and initializing their elements is false? a. The new keyword should be used to create an array. b. When an array is created, the number of elements must be placed in square brackets following the type of element being stored. c. The elements of an array have unknown values just after the array has been created. d. A for loop is an excellent way to initialize the elements of an array. 7: Assume the following class declaration. class MyClass { int a; String q; public void firstMethod() { int b, ; * 7; + c * a; } } Mark the following statements as TRUE or FALSE. q is a reference variable which refers to the empty string. __TRUE___ b and c are local variables. ___TRUE____ a, b, and c are primitive data types. ___FALSE____ MyClass is a Java application. ___FALSE____ 8: Which statement below could be used to randomly select a state from an array which contains exactly 50 strings which are the names of the states?
  • 3. 1 + ( int ) ( Math.random( ) * 49 ); ( int ) ( Math.random( ) * 51 ); ( int ) ( Math.random( ) * 50 ); 1 + ( int ) ( Math.random( ) * 50 ); 9: To draw a single line from (0, 15) to (20, 25), call the method _________ of the Graphics class in the paintComponent method. a.drawLine( 0, 15, 20, 25 ); b.drawString( "single line", 0, 15 ); c.drawLine( 0, 15, 20, 10 ); d.drawLine( 15, 0, 25, 20 ); 10: In the Java graphics system, coordinate units are measured in ________. a.dots b.pixels c.points d.inches 11: Which is a correct way to invoke the static method sqrt of the Math class? a.sqrt( 900 );. b.math.sqrt( 900 );. c.Math.sqrt( 900 );. d.Math Math(); math.sqrt( 900 );. 12: When an object is concatenated with a String a.a compilation error occurs. b.a runtime error occurs. c.the object’s toString method is implicitly called to obtain the String representation of the object. d.the object’s class name is used. 13: What do the following statements do? double array[]; double[ 14 ]; a. Creates a double array containing 13 elements. b.Creates a double array containing 14 elements.
  • 4. c. Creates a double array containing 15 elements. d. Declares but does not create a double array. 14: Consider the class below: public class Test { public static void main( String args[] ) { int a[]; int[ 10 ]; for ( int ; i <a.length; i++ ) a[ i ] = i + 1 * 2; int ; for ( int ; i <a.length; i++ ) result += a[ i ]; System.out.printf( "Result is: %dn", result ); } // end main } // end class Test The output of this Java program will be a. Result is: 62 b. Result is: 64 c. Result is: 65 d. Result is: 67 15: Which method call converts the value in variable stringVariable to an integer? a. Convert.toInt( stringVariable ) b. Convert.parseInt( stringVariable ) c. Integer.parseInt( stringVariable ) d.Integer.toInt( stringVariable )