ITCS-1213

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

The file extension of a Java source code file is A .class B .java C .bytecode D .exe

.java

What javadoc tag is used to specify the writer of the class source code? A @version B @writer C @author D @programmer

@author

A reference variable will hold an A Object B Address C Set of fields D Variable

Address

Where do you type javadoc comments? A Inside each method B At the top of the class definition file C Above each method heading D Anywhere in your source code file

At the top of the class definition Above each method heading

The name of the your source code file must: A Be exactly the same as the public class in the file B Must be short C Must start with a lowercase letter D Must start with an uppercase letter

Be exactly the same as the public class in the file

What is the name of the IDE we are using in lecture and lab? A Java B javac C BlueJ D Eclipse

BlueJ

A Java symbolic constant must be assigned a value when it is declared. A true B false

False

A class can have many different constructor methods as long as the names are different. A true B false

False

A class is an object, True or False

False

Every object has a reference variable holding its address, True or False

False

Fields and variables are the same thing, True or False

False

In a class definition file, each method must have a different name, True or False

False

Java is a compiled language and the compiler produces an executable. A true B false

False

Once an object is created the fields should not change their values. True or False

False

Once an object is created you can call the constructor method again to change the value of the fields A true B false

False

Only one instance can be created from a class definition, True or False

False

You can only create one instance of a class. A true B false

False

What must you include in the subject line of all email to me? A ITCS 1213 B Java C the reason your are writing D ITCS 1213-001

ITCS-1213-FALL

Where does execution of a Java application start? A In public static void main in a public class B In public main C In public static void main in a private class D In a class named public static void main

In a public void main in public class

In order to use the BlueJ debugger your code A Must have no syntax errors B Must have no logic errors C Must have no syntax and no logic errors D Must have two or more classes

Must have no syntax errors

When the address of an object is not stored in any reference variable, that object is known as a(n) A Empty object B orphan C Null object D Extra object

Null Object

If your method is reading input from one input stream only, how many Scanner objects are needed? A One object for each data item you are reading B Two, one to read ints, and one to read doubles C Only one D As many as the number of data items your project needed

Only one

Where are all fields declared? A Inside a main( ) method B Inside a constructor method( ) C Outside of any method D In the parameter list

Outside of any method

What class is prewritten and used to read input? A Scanner B Input C Keyboard D nextInt(

Scanner

By convention, all class names A Use camel notation B Are in all lowercase letters C Start with an uppercase letter D Are in all caps

Start with an uppercase letter

What built in class is used to mange sequences of characters? A string B Character C String D Buffer

String

Which of the following is not a Java primitive data type? A int B String C boolean D char

String

What built in class is used to manipulate and change sequences of characters? A String B Character C StringBuilder D string

StringBuilder

What parameter do you send to the constructor of the Scanner class to indicate you will use keyboard input? A keyboard B System C system.in D System.in

System.in

What are the javadoc comments used for? A To provide a format for html conversion B To provide inline comments C To check syntax errors D To provide standardization in code

To provide a format for HTML conversion

What is the purpose of the toString( ) method? A To print an object B To change the values of the fields C To return an object D To return a textual representation of the state of an object

To return a textual representation of the state of an object

A constructor for a class can be called many times to create instances A true B false

True

Both fields and local variables can be declared as final. A true B false

True

Every object must have a name, True or False

True

Fields are usually given private access, True or False

True

If you do not write a constructor method for you class, Java will provide one for you. A true B false

True

More than one reference variable can hold the address of an object, True or False

True

To use the debugger in BlueJ your class file must be compiled. A true B false

True

What is the return data type of the String class equals( ) method? A boolean B int C Depends on what type of data the obect holds D String

boolean

A java project is a collection of A classes B programs C BlueJ D functions

classes

Which method is used to "build" an object? A set( ) B class( ) C constructor method D mutate( )

constructor method

What Java operator allows you to access public methods? A set operator B get operator C new operator D dot operator

dot operator

The term for declaring the fields of a class and the methods that change the values of these fields is in one class definition file is: A effectiveness B private C encapsulation D Sequencing

encapsulation

What keyword is used to declare a constant field? A private B final C const D constant

final

What is the return type of the String class compareTo( ) method? A boolean B int C String D coid

int

The debugger helps you locate which types of errors? A syntax B Java C logic D stupid

logic

Another name for a set( ) method is a A get method B access method C mutater method D change method

mutator method

What operator is used to create object from class definitions(templates)? A create B new C construct D instantiate

new

What is the return type of the constructor method of a class? A void B Object C no return type is allowed D int

no return type is allowed

The two categories of data types in Java are A numeric and non-numeric B int and double C primitive and reference D object and numeric

primitive and reference

Which debugger command allows you to go into the code at a method call? A step B step into C continue D terminate

step into

A class is a: A template B instance C field D method

template

What does immutable mean? A strong B unchangeable C flexible D changeable

unchangeable


Set pelajaran terkait

Calvin Cycle (Mastering Biology) (Exam3)

View Set

Developmental Psychology Exam 3 Review

View Set

Midterm Net & Web Security Analysis

View Set

Mid-Term Review Period 4: From The Jefferson Era to the Era of Good Feelings to the Age of Jackson (Including Review Questions)

View Set

Quiz #2 Cardiovascular System and circulation

View Set

Biology 1321 Exam 1 Review (Vargas) Texas State

View Set

Intro to Comptuer Programming Preamble to Ch 2

View Set

Texas Life and Health other questions

View Set