Study sets matching "java 3"

Study sets
Classes
Users

Study sets matching "java 3"

20 terms
Java 3
The variable declaration ... float priceQ…
The variable ... House Number... is incorrec…
Name of method I am calling... AskForAmou…
computing industry standard used to un…
a field named price quote holds numerical data including deci…
white space is not permitted
whatAmount
unicode
The variable declaration ... float priceQ…
a field named price quote holds numerical data including deci…
The variable ... House Number... is incorrec…
white space is not permitted
24 terms
Java 3
Accessor
Multiple
Constructor
Public
A method that GETS a value but does not change it
Two or more arguments passed by a method
A method that is automatically called when an object is created
Access specifier that indicates the code will be available to…
Accessor
A method that GETS a value but does not change it
Multiple
Two or more arguments passed by a method
30 terms
Java Array3
Declare x array to hold elements are 1…
Declare an array for the months of the…
Array named days has days of the week.…
You have an array of 77 whole numbers…
int x[] = {1.2, 2.4, 3.6, 4.8 };
String[] months=new String[12];
"sat"
xyz[76] =-1;
Declare x array to hold elements are 1…
int x[] = {1.2, 2.4, 3.6, 4.8 };
Declare an array for the months of the…
String[] months=new String[12];
50 terms
Java 3
b
c
a
a
QN=101(129) public class Test{... public static void main(String…
QN=102(77) public class Test{... public static void main(String[…
QN=103(4924) public class Test{... public static void main(Strin…
QN=104(4925) public class Test{... public static void main(Strin…
b
QN=101(129) public class Test{... public static void main(String…
c
QN=102(77) public class Test{... public static void main(String[…
5 terms
Java 3 - Quiz 3
Object
empty
False
False
question unavailable
If the head instance variable of a linked list contains a ref…
True or False. When using a linked list, you do not need to k…
True or False. Forgetting to set the reference instance varia…
Object
question unavailable
empty
If the head instance variable of a linked list contains a ref…
35 terms
Java 3
Class AccountTest
Instance Variable
setName
getName
Main method creates and uses Account object to test class Acc…
Maintain data to each object/instance of the class.
This is a method of a class. This method stores a name in an…
This is a method of a class. This method obtains a name from…
Class AccountTest
Main method creates and uses Account object to test class Acc…
Instance Variable
Maintain data to each object/instance of the class.
10 terms
JAVA 3
Objects of type List allow duplicates.
The Collections class (as opposed to t…
Objects of type Set allow duplicates.
An object of type SortedSet is a Set t…
True
True
False
False
Objects of type List allow duplicates.
True
The Collections class (as opposed to t…
True
14 terms
Java 3
Arithmetic Expression
Comments
Coordinate System
Exception
an expression made of operands and operators
explanatory statements inserted in a program to clarify certa…
programs use the upper left corner of this graph system and x…
an event taking place in the middle of a program that disrupt…
Arithmetic Expression
an expression made of operands and operators
Comments
explanatory statements inserted in a program to clarify certa…
10 terms
Java 3
access specifier
encapsulation
explicit parameter
implicit parameter
public/private
using methods to access data but not see it
System.out.println(greeting) greeting is the explicit paramet…
System.out, the name of the object that you are getting a met…
access specifier
public/private
encapsulation
using methods to access data but not see it
8 terms
Java 3 - Quiz 9
Event-driven Programming
boolean
action events
actionPerformed()
A programming style that uses a signal and response approach…
The JFrame method setVisible() takes one argument of type:
A button fires events known as:
The ActionListener interface requires that the method _____ b…
Event-driven Programming
A programming style that uses a signal and response approach…
boolean
The JFrame method setVisible() takes one argument of type:
7 terms
Java 3 - Quiz 7
preorder processing
postorder processing
all will be < 34
A binary search tree is made up of a c…
Recursively visiting the root node, left subtree and then the…
Recursively visiting the left subtree, right subtree and then…
In a binary search tree, where the root node key = 34, what d…
Which of the following Node references must be attributes of…
preorder processing
Recursively visiting the root node, left subtree and then the…
postorder processing
Recursively visiting the left subtree, right subtree and then…
7 terms
Java 3 - Quiz 6
root
two
hash function
set
The ____ node is the first node in the tree data structure.
A binary tree has exactly ____ link instance variables.
A _____ maps a data value such as a String into a number:
Which data structure does not keep its elements in any type o…
root
The ____ node is the first node in the tree data structure.
two
A binary tree has exactly ____ link instance variables.
6 terms
Java 3 - Quiz 5
the third and fourth nodes
linked list
O(n)
2
Which nodes need to be updated when we insert a new node as t…
A(n) _____ is a data structure used for collecting a sequence…
Adding or removing an arbitrary element in an array takes ___…
If we want a create a doubly linked list data structure so th…
the third and fourth nodes
Which nodes need to be updated when we insert a new node as t…
linked list
A(n) _____ is a data structure used for collecting a sequence…
8 terms
Java 3 - Quiz 2
Stack
last in - first out
recursive solutions may be easier to u…
6
The underlying data structure used by the computer during rec…
The stack is a ________________ data structure.
A recursive solution can be preferable to an iterative soluti…
public static double rec (double n) { if (n == 0) { return 1;…
Stack
The underlying data structure used by the computer during rec…
last in - first out
The stack is a ________________ data structure.
8 terms
Java 3 - Quiz 8
d) toString()
size()
boolean
a) Queue<T>
All of the following methods are part of the Collection<T> in…
The method ___ can be used to determine the number of element…
The method contains(Object o) of the ArrayList class returns…
All of the following are members of Java's Collection class e…
d) toString()
All of the following methods are part of the Collection<T> in…
size()
The method ___ can be used to determine the number of element…
42 terms
Java Chapter 3
Abstract data type
ArithmeticException
Assignment statement
Case sensitive
A class. A data type that can store data and methods.
An exception thrown when division by 0 occurs.
A statement that gives the variable or constant on the left o…
An uppercase letter is different from the same letter in lowe…
Abstract data type
A class. A data type that can store data and methods.
ArithmeticException
An exception thrown when division by 0 occurs.
Java 3
The best data type for the data below…
Omission of the semicolon, ";", to sep…
The (int) syntax in the Java statement…
The following statement can produce th…
char
syntax
type casting
True
The best data type for the data below…
char
Omission of the semicolon, ";", to sep…
syntax
11 terms
BHS JAVA Lesson 3
Concatenation
length()
substring()
indices
Combines strings with a +
Method used to find the number of characters in a string--Cou…
Method used to count the number of characters in a piece of s…
Number in the count of a substring
Concatenation
Combines strings with a +
length()
Method used to find the number of characters in a string--Cou…
Java How To Program 3
both
!
static
java
The & and | operators work identically to the && and || opera…
The unary __ (logical NOT) operator reverses the value of a c…
All the objects of a class share one copy of the class' ____…
You can place a main method in every class you declare - only…
both
The & and | operators work identically to the && and || opera…
!
The unary __ (logical NOT) operator reverses the value of a c…
8 terms
Java 3 - Quiz 10
JMenuItem
JTextArea
False
False
A menu item is an object of the class:
A _____ allows multiple lines of text to be displayed.
True or False. The actionPerformed method of the ActionListen…
True or False. When using the BorderLayout manager you must s…
JMenuItem
A menu item is an object of the class:
JTextArea
A _____ allows multiple lines of text to be displayed.
18 terms
Java OOP - P3
a
d
d
b
Use the following Java program for answering question 11 and…
Consider the following program:... class prob1{... int puzzel(int n…
The blank space in the following sentence has to be correctly…
Java compiler javac translates Java source code into ........…
a
Use the following Java program for answering question 11 and…
d
Consider the following program:... class prob1{... int puzzel(int n…
Java3
perform
declared
instance variable
operate
(v) biểu diễn; làm, thực hiện
adj. công khai, công nhiên, không úp mở ... khai báo
biến thuộc tính
(v) hoạt động, thực hiện chức năng
perform
(v) biểu diễn; làm, thực hiện
declared
adj. công khai, công nhiên, không úp mở ... khai báo
26 terms
Java CH 3
Which one of the following would conta…
A Java program must have at least one…
The term ________ typically refers to…
If the following Java statements are e…
Demo.class
Class definitionp
d. Standard output device Correct
b. The top three winners are ... Jody, the Giant ... Buffy, the Bar…
Which one of the following would conta…
Demo.class
A Java program must have at least one…
Class definitionp
Chapter 3 Test Java
implementing a class
method definition
constructors contain
constructor name
you first need to know which methods are required
contains an access specifier (usually public), a return type,…
instructions to initialize objects and the instructions to in…
always the same as the class name
implementing a class
you first need to know which methods are required
method definition
contains an access specifier (usually public), a return type,…
Java: Chapter 3.
Declare a variable named myMenu suitab…
Declare a reference variable of type F…
Suppose a reference variable of type D…
Suppose a reference variable of type S…
Menu myMenu ;
File myFile;
Double myDouble2 = new Double(x);... myDouble = myDouble2;
String myString2 = new String();... myString = myString2;
Declare a variable named myMenu suitab…
Menu myMenu ;
Declare a reference variable of type F…
File myFile;
Java Vocab Ch. 3
Method
Parameter
Return Type
Strongly Typed
A named block of code
A variable declared in a method's declaration into which valu…
The data type of the value that a method will return
Languages of this type require that variables must be given s…
Method
A named block of code
Parameter
A variable declared in a method's declaration into which valu…
Java 3 + 4
Object Reference Variable
Instantiation
Aliases
Garbage Collection
ex. String Title; holds address of object
Creating an object
Two or more references that refer to the same object.
removes object with no references
Object Reference Variable
ex. String Title; holds address of object
Instantiation
Creating an object
Java Keywords - Set 3
const
goto
true
false
a reserved word in java that is not currently used (other lan…
a reserved word in java that is not currently used (other lan…
indicates a statement is accurate
indicates a statement is not accurate
const
a reserved word in java that is not currently used (other lan…
goto
a reserved word in java that is not currently used (other lan…
20 terms
Chapter 3 Java Basics
One-Line-Comment syntax
Block-Comment syntax
The class heading for a program named…
The main method heading
//
/* */
public class Dream
public static void main(String[] args)
One-Line-Comment syntax
//
Block-Comment syntax
/* */
16 terms
Java Vocabulary Chapter 3
Arithmetic Expression
Comments
Syntax
Semantics
A sequence of operands and operators that computes a value.
// or / /
Rules for combining objects and variables
Rules for interpreting the meaning of code
Arithmetic Expression
A sequence of operands and operators that computes a value.
Comments
// or / /
22 terms
Absolute Java Chapter 3
Compound Statement
if-else statement
switch statement
multiway if-else statement
a list of statments encolsed in a pair of braces, is treated…
chooses between two alternative actions based on the value of…
is the only other kind of Java statement that implements mult…
it is simply an ordinary if-else statement nested inside if-e…
Compound Statement
a list of statments encolsed in a pair of braces, is treated…
if-else statement
chooses between two alternative actions based on the value of…
Final_AdvJava 3
b
c e
a d
b
What is the outcome of executing ServletA? You can assume tha…
Identify which of the following are names of special attribut…
What are possible outcomes from executing the doGet method in…
What is the web page output from executing ServletD with the…
b
What is the outcome of executing ServletA? You can assume tha…
c e
Identify which of the following are names of special attribut…
23 terms
3.900 D JAVA Recursion
Write the code for the method for comp…
Is the gcd computation recursive metho…
Write the code for the method for comp…
Write a tail recursive method for comp…
public static int gcd(int x, int y) {... if (x % y == 0)... retur…
True
public int Factorial (int num) {... if (num == 1)... return 1;... el…
public int factorial(int Num) {... if(Num == 0) {... return 1; }…
Write the code for the method for comp…
public static int gcd(int x, int y) {... if (x % y == 0)... retur…
Is the gcd computation recursive metho…
True
45 terms
Java Ch. 3
Example of implicit parameter - mySavi…
Method
Constructor
When are local variables initialized
mySavings
What parameters and local variables belong to
To set the position of the shape when drawing complex shapes
You must initialize local variables in a method body
Example of implicit parameter - mySavi…
mySavings
Method
What parameters and local variables belong to
14 terms
3.730 E Java Common Coding Patterns
Traverse an array starting at the begi…
Traverse a list starting at the beginn…
Traverse an array starting at the end.
Traverse a list starting at the end.
for ( int inx = 0 ; inx < array.length ; ++inx )... someMethod(…
for ( int inx = 0 ; inx < list.size() ; ++inx )... someMethod(…
for ( int inx = array.length - 1 ; inx >= 0 ; --inx )... someMe…
for ( int inx = list.size() - 1 ; inx >= 0 ; --inx )... someMet…
Traverse an array starting at the begi…
for ( int inx = 0 ; inx < array.length ; ++inx )... someMethod(…
Traverse a list starting at the beginn…
for ( int inx = 0 ; inx < list.size() ; ++inx )... someMethod(…
Java 3 Vocab
Stream
Float
Exit( ) Method
Instantiate
data flowing in or out of a program
stores number with up to 6 or 7 decimals as single precision…
is used to terminate an application that displays a graphical…
declare the instance of
Stream
data flowing in or out of a program
Float
stores number with up to 6 or 7 decimals as single precision…
158 terms
JAVA WEB 3
#which statement(s) about servlet life…
#which syntax is correct for jsp decla…
#your jsp page uses classes from java.…
#which class that includes the getsess…
all the others
<%! code %>
<%@ page import="java.util.*"%>
httpservletrequest
#which statement(s) about servlet life…
all the others
#which syntax is correct for jsp decla…
<%! code %>
JavaScript Terms 3
Alert(message)
Confirm
Message
Infinite loop
Displays a message box
Displays a message and returns true ok
The test to display
Fixing a bug/problem in a loop
Alert(message)
Displays a message box
Confirm
Displays a message and returns true ok
20 terms
JavaScript 3
Convert the assignments for myVar = my…
The ... operator multiplies a variable…
myVar = myVar * 5;... Convert the above…
The ... operator divides a variable by…
myVar -= 5;
*=
myVar *= 5;
/=
Convert the assignments for myVar = my…
myVar -= 5;
The ... operator multiplies a variable…
*=
12 terms
Java Lesson 3
arithmetic expression
comments
exception
literal
A sequence of operands and operators that computes a value
Non-executable statements used to make a program more readable
An abnormal state or error that occurs during run time and is…
An element of a language that evaluates to itself, such as 34…
arithmetic expression
A sequence of operands and operators that computes a value
comments
Non-executable statements used to make a program more readable
8 terms
Java 1 Week 3
Constant
Identifier
Prologue
Main method
A constant in Java is used to map an exact and unchanging val…
This is the correct name for a programs components name e.g.…
Special example of a block comment, providing information abo…
Public static void main (String [] args)
Constant
A constant in Java is used to map an exact and unchanging val…
Identifier
This is the correct name for a programs components name e.g.…
20 terms
Java OOP - P3
c
a
d
d
What would the output be of the above Program - III before an…
What would the argument passing method be which is used by th…
Consider the following program:... class prob1{... int puzzel(int n…
The blank space in the following sentence has to be correctly…
c
What would the output be of the above Program - III before an…
a
What would the argument passing method be which is used by th…
40 terms
Java Found 3
1) The ________________ operator is us…
A special method that is invoked to se…
3) Which of the following is an invali…
Assume that we have a Random object re…
Answer: b... Explanation: The new operator instantiates an obje…
Answer: d... Explanation: The constructor is called to set up a…
Answer: e... Explanation: Choices a and d represent the standar…
Answer: c... Explanation: When called with 16 as a parameter, t…
1) The ________________ operator is us…
Answer: b... Explanation: The new operator instantiates an obje…
A special method that is invoked to se…
Answer: d... Explanation: The constructor is called to set up a…
Chapter 3 Java Vocab
arithmetic expression
comments
coordinate system
exception
a sequence of operands and operators that compute a value
non-executable statements used to make a program readable
a grid that allows a programmer to specify positions of point…
an abnormal state or error that occurs during runtime and is…
arithmetic expression
a sequence of operands and operators that compute a value
comments
non-executable statements used to make a program readable
19 terms
JAVA ch 3
Q1: Method headers contain all of the…
2: Every Java application is composed…
3.2 Q3: A class instance creation expr…
3.2 Q4: Calling a method of another ob…
ANS: b. Left brace.
ANS c. public class declaration
ANS: d. All of the above.
ANS a. The dot separator.
Q1: Method headers contain all of the…
ANS: b. Left brace.
2: Every Java application is composed…
ANS c. public class declaration
advance java 3
b
d
e
a
QN=48 What should be the return type of the method using @Pre…
QN=49 Which of the following lines of code are correct? (Choo…
QN=50 Which is NOT a state in the EJB 3 Entity beans life cyc…
QN=51 Which class type must be implicitly or explicitly denot…
b
QN=48 What should be the return type of the method using @Pre…
d
QN=49 Which of the following lines of code are correct? (Choo…
CSE3 Java
Identifier (variable) rules
3 basic data types
Numbers
Booleans
Begin with a letter... May be followed by letters, digits... Cannot…
Numbers... Booleans... Strings
No "units"... About 10 significant digits
Values: true or false... May initialize variables
Identifier (variable) rules
Begin with a letter... May be followed by letters, digits... Cannot…
3 basic data types
Numbers... Booleans... Strings
12 terms
JavaScript Functions 3
function gloop(num){... if(num > 10) {... r…
function myTest(val){... if(val > 5){... r…
function tree(cherry){... if(cherry > 15)…
function myTest(val){... if(val > 10) {…
"10 or Less"
"5 or Smaller"
"Between 5 and 15"
"Between 5 and 10"
function gloop(num){... if(num > 10) {... r…
"10 or Less"
function myTest(val){... if(val > 5){... r…
"5 or Smaller"
11 terms
Java Chapter 3
Instantiation
Dot Operator
Constructor
Aliases
Creating an object using the new operator.
What we use to access an instantiated object's methods.
Special method that has the same name as its class.
Two names that refer to the same object.
Instantiation
Creating an object using the new operator.
Dot Operator
What we use to access an instantiated object's methods.
8 terms
Java 3 - Quiz 1
Invokes itself
True
True
False
A recursive method is one that:
True or False. A method definition that includes a call to it…
True or False. When a recursive call is encountered, computat…
True or False. A base case must include a recursive call.
Invokes itself
A recursive method is one that:
True
True or False. A method definition that includes a call to it…
1 of 10