| Terms |
Definitions |
|
f
|
f
|
|
UML
|
Universal Modeling Language
|
|
Object
|
An instance of a class.
|
|
What is autoboxing/unboxing?
|
Automatically converting primitive variables to their object wrapper and vice versa in java 1.5+. This occurs in cases such as storing primitives in collections (which can only hold references to objects)
|
|
A type that defines the implementation of a particular kind of object.
|
class
|
|
A collection of graphical user interface (GUI) components that runs uniformly on any native platform which supports the Java virtual machine. Because they are written entirely in the Java programming language, these components may provide functionality ab
|
Swing
|
|
Enumerate all possible decision sequences and determine the optimal one.
|
Dynamic Programming
|
|
Can an overloaded class have a different return type from the method being overloaded?
|
Yes
|
|
PSEUDOCODE
|
a rough-draft outline of an answer, written in English-like terms
|
|
Describes a program that is designed to have parts of its code execute concurrently.
|
multithreaded
|
|
Refactor
|
To improve a program without changing the way it works (i.e., its API). Example include renaming fields or variables, streamlining code, etc. Very important in agile development because of emphasis on self-documenting code.
|
|
what is one way to print
|
printf( );
|
|
Define: Volatile
|
can only be applied to instance variables
|
|
List Commond Behavioral Patterns
|
--- Chain of Responsibility--- Command--- Interpreter--- Iterator--- Mediator--- Memento--- Observer--- State--- Strategy--- Template Method--- Visitor
|
|
A Java keyword used to define a variable as a class variable. Classes maintain one copy of class variables regardless of how many instances exist of that class. It can also be used to define a method as a class method. Class methods are invoked by the cl
|
static
|
|
CONDITIONAL OPERATOR general syntax
|
(condition) ? statement1 : statement2; If the condition is true, statement1 is executed. If the condition is false, statement2 is executed.
|
|
An item of data named by an identifier. Each ________ has a type, such as int or Object, and a scope.
|
variable
|
|
Constructor
|
Special block of code used to create an instance of a class (or, if you prefer, an object whose type is the class). Used with the “new” keyword (e.g., Person p = new Person() calls the Person() constructor).
|
|
(1) variables store numbers. (2) variables store references
|
(1) Number
(2) Object
|
|
What is used to convert strings into integers?
|
Integer.parseInt()
|
|
3.1
c) Every class declaration contains keyword ____ followed immediately by the class's name
|
3.1
c) Every class declaration contains keyword ____ followed immediately by the class's name
Answer: Class
|
|
Define: Mediator (design pattern)
|
Define an object that encapsulates details and other objects interact with such object. The relationships are loosely decoupled.
|
|
A class that contains one or more methods that have no implementation, and therefore can never be instantiated. These classes are defined so that other classes can extend them and make them concrete by implementing their methods.
|
abstract class
|
|
Static Method
|
A method that belongs to the entire class instead of one instance of the
class. Invoked with <Class>.<Method>
Used for methods that don’t rely on any one instance of a class.
|
|
Syntax 2.4 IMPORTING A CLASS FROM A PACKAGE
import packageName.ClassName;
Purpose: To import a (1) form a package for use in a program
|
(1) Class
|
|
If a method does not return a value the return type must be specified as?
|
Void
|
|
Define: Var-args
|
an arg of varying lenght. must be last param in method. can only have one per method.
|
|
Define: Intercepting Filter (design pattern)
|
A pluggable component design to intercept incomming requests and outgoing responses, provide common services in a standard manner (independently) without changing core processing code.
|
|
A data item known within a block, but inaccessible to code outside the block. For example, any variable defined within a method is a _____ _______ and can't be used outside the method.
|
local variable
|
|
void method (procedure)
|
this type of method does not return anything to the method call. The method just does whatever it is supposed to do
|
|
3.1
m) Scanner method ____ reads characters until a new line character is encountered, then returns those characters as a String.
|
3.1
m) Scanner method ____ reads characters until a new line character is encountered, then returns those characters as a String.
Answer: NextLine
|
|
Define: Template Method (design pattern)
|
Provide an abstract definition for a method or a class and redefine its behavior later or on the fly without changing its structure.
|
|
Define: Visitor (design pattern)
|
Define a new operation to deal with the classes of the elements without changing their structures.
|
|
precondition of a method
|
an assumption that must be true that method makes about its arguments
|
|
precondition of a method
|
the divisor is not zero is an example of an assumption
|
|
when the sequence of elements of the list is not significant.
|
Unordered List
|
|
Define: Chain of Responsibility (design pattern)
|
Let more than one object handle a request without their knowledge of each other. Pass the request to chained objects until it has been handled.
|
|
five tenets of structured programming
|
a. No goto statements are to be used in writing code.b. All programs can be written in terms of three control structures: sequence, selection, and iteration.c. Each control structure has one entrance point and one exit point. We will sometimes allow for multiple exit points from a control structure using the break statement.d. Control structures may be stacked (sequenced) one after the other.e. Control structures may be nested inside other control structures.
|
|
3.2
k) The number of arguments in the method call must match the number of parameters in the method declaration's parameter list.
|
3.2
k) The number of arguments in the method call must match the number of parameters in the method declaration's parameter list.
Answer: True
|
|
3.6 What is the default constructor? How are an object's instance variables initialized if a class has only a default constructor?
|
3.6 What is the default constructor? How are an object's instance variables initialized if a class has only a default constructor?
By dafault, the compiler provides a default constructor. It had no parameters in any classs that does not explicity include a constructor.
The instance variable are initialized to their default value
|
|
Can a class access a default member variable from another class?
|
No default access modifier is protected.
|
|
A method name is overlooked if a (1) has more than one (2) with the same name (but different parameter (3))
|
(1) Class
(2) Method
(3) Types
|
|
Axis isn't just a SOAP engine -- it also includes?
|
a simple stand-alone server,a server which plugs into servlet engines such as Tomcat,extensive support for the Web Service Description Language (WSDL),emitter tooling that generates Java classes from WSDL.some sample programs, anda tool for monitoring TCP/IP packets.
|
|
If class X _______ class Y to add functionality, either by adding fields or methods to class Y, or by overriding methods of class Y. Class X would be a subclass of class Y.
|
extends
|
|
If class X _______ class Y to add functionality, either by adding fields or methods to class Y, or by overriding methods of class Y. Class X would be a subclass of class Y.
|
An interface _______ another interface by adding methods.
|
|
8.3 What happens when a return type, even void, is specified for a constructor.
|
8.3 What happens when a return type, even void, is specified for a constructor.
Answer: Makes it a normal method.
|
|
8.1 Fill in the blanks in each of the following statements:
s) A(n) ___ declaration imports only the classes that the program uses from a particular package.
|
8.1 Fill in the blanks in each of the following statements:
s) A(n) ___ declaration imports only the classes that the program uses from a particular package.
Answer: type-import-on-demand
|
|
front
|
back
|
|
Define: JSON
|
JavaScript Object Notation
|
|
Access Modifier
|
Reserved words “public”, “private”, “protected” in Java. Control whether
classes and members may be accessed from any class, only this class, subclasses. Default is access from any class in the package.
|
|
Define: UDDI
|
Universal Description Discovery and Integration - A platform independent XML registry for web services.
|
|
A pseudo-method that creates an object. In the Java programming language, these are instance methods with the same name as their class. They are invoked using the new keyword.
|
constructor
|
|
The concept of classes automatically containing the variables and methods defined in their supertypes.
|
inheritance
|
|
class diagram
|
a visual representation of the relationships betwen classes
|
|
Can access modifiers by applied to local variables?
|
NO
|
|
Describes a program that is designed to have parts of its code execute concurrently.
|
multithreaded
|
|
general syntax of the if-else statement
|
if (expression) statement1;else statement2;
|
|
A Java keyword used in method declarations to specify that the method does not return any value. It can also be used as a nonfunctional statement.
|
void
|
|
Place drawing instructions inside the (1) method. That method is called whenever the component needs to be repainted
|
(1) paintComponent
|
|
3.2
h) Primitive-type local variables are initialized by default.
|
3.2
h) Primitive-type local variables are initialized by default.
Answer: False
|
|
Define: Native
|
implemented in native code (usually C) and end in ";" just like abstract method.
|
|
What can a final class not do?
|
Be sub-classed
|
|
The standardized relational database language for defining database objects and manipulating data.
|
Structured Query Language (SQL)
|
|
RELATIONAL OPERATOR
|
a binary operator that compares two values
|
|
The technique of hiding the details of the implementation of an object, while making its functionality available to other objects.
|
encapsulation
|
|
Field
|
Member in a class that holds data (e.g., name, age, etc.). Usually marked
private so that other programs cannot directly access.
|
|
Identifiers for variables, methods, and classes are composed of (1), (2) and (3) letters.
|
(1) Letters
(2) Digits
(3) Underscore
|
|
How would you compile the file Welcome.java in DOS?
|
javac Welcome.java
|
|
3.1
k) Keyword pubic a(n) ___.
|
3.1
k) Keyword pubic a(n) ___.
Answer: Access Modifer
|
|
Define: Command (design pattern)
|
Streamlize objects by providing an interface to encapsulate a request and make the interface implemented by subclasses in order to parameterize the clients.
|
|
Define: bridge (design pattern)
|
Decouple an abstraction or interface from its implementation so that the two can vary independently.
|
|
Define: Strictfp
|
aheres to IEEE 754 for floating point numbers
|
|
A variable data type in which the variable's value is of the appropriate size and format for its type. These data types include various integer, floating-point, boolean and string types.
|
primitive type
|
|
JUnit Test
|
A Java class used to test individual methods in a class. Used to build test cases, e.g., when using agile development methodology.
|
|
The public interface of a class specifies what you can do with its (1). The (2) implementation describes how these actions are carried out.
|
(1) Objects
(2) Hidden
|
|
What are the possible values for a boolean expression?
|
True False
|
|
Does Seam have continuations?
|
jBPM "wait state" is a continuation. Each node in a pageflow definition or node in a business process definition is a jBPM wait state. Speaking more approximately, you might like to think of the conversation state as a continuation. (We do not usually talk in this kind of language because it is too mysterious-sounding and obfuscates simple concepts to make them seem more impressive.)
|
|
What are the non-access modifiers that are applicable to a class?
|
final, abstract, and strictfp
|
|
API (Application Programming Interface)
|
The way one program uses another program. In Java, the API can be
thought of as the collection of public methods for a class or package.
|
|
What is a stream?
|
An object that either delivers or takes data to or from a source.
|
|
3.1
e) Each parameter must specify both a(n) ____ and a(n) ____.
|
3.1
e) Each parameter must specify both a(n) ____ and a(n) ____.
Answer: Type,name.
|
|
3.2
j) Any class contains public static void main(String args[]) can be used to execute an application
|
3.2
j) Any class contains public static void main(String args[]) can be used to execute an application
Answer: True
|
|
Define: Observer (design pattern)
|
One object changes state, all of its dependents are updated automatically.
|
|
Can Seam handle back-button navigation ?
|
Seam's nested conversation model makes it really easy to build complex, stateful applications that tolerate use of the back button.
|
|
What is stub code?
|
A simplified version of a method that is good enough for testing to be sure that it is correct.
|
|
6.1
b) A variable known only within the method in which it is declared is called a(n) ___.
|
6.1
b) A variable known only within the method in which it is declared is called a(n) ___.
Answer: local variable
|
|
When can a class access a protected member of a class in another package?
|
When it inherits the member
|
|
A function defined in a class.
|
method
|
|
A function defined in a class.
|
Unless specified otherwise, it is not static.
|
|
6.1
k) The ___ of a declaration is the portion of a program that can refer to the entity in the declaration by name.
|
6.1
k) The ___ of a declaration is the portion of a program that can refer to the entity in the declaration by name.
Answer: scope
|
|
6.1
a) A method is invoked with a(n) ___
|
6.1
a) A method is invoked with a(n) ___
Answer: Method call.
|
|
Can a constructor be called explicitly by name from another method?
|
No, constructors are invoked only by the keyword new, or from another constructor using this() or super()
|
|
The (1) value of a method is a result that the method has computed for use by the (2) that called it
|
(1) Return
(2) Code
|
|
What's the difference between MVC1 and MVC2
|
MVC1: used JSP pages and the JavaBeans component architecture to implement the MVC architecture for the Web. HTTP requests are sent to a JSP page that implements Controller logic and calls out to the “Model” for data to update the “View.” This approach combines Controller and View functionality within a JSP page and therefore breaks the MVC paradigm. MVC1 is appropriate for simple development and prototyping. It is not, however, recommended for serious development. MVC2: term invented by Sun to describe an MVC architecture for Web-based applications in which HTTP requests are passed from the client to a “Controller” servlet which updates the “Model” and then invokes the appropriate “View” renderer-for example, JSP technology, which in turn renders the View from the updated Model. The hallmark of the MVC2 approach is the separation of Controller code from content. (Implementations of presentation frameworks such as Struts, adhere to the MVC2 approach).
|
|
JVM (Java Virtual Machine) (also known as Java Runtime Engine or
JRE)
|
The program that runs Java programs on a specific platform. Java source code is compiled into .class files. These contain the instructions used by the JVM to actually run the programs on a Windows PC, a Linux computer,
a Mac computer, etc. The JVM is written for each platform supported by Java.
|
|
3.9 Explain how a program could use class Scanner without importing the class from package java.util.
|
3.9 Explain how a program could use class Scanner without importing the class from package java.util.
Answer: When declaring the input buffer, specify that the scanner is in the Java util library directory.java.util.Scanner input = new java.util.Scanner( System.in ); //command statement
|