Deck 1: Java Programming: HTTP Protocol, Scripting Tasks, and Data Access
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/25
Play
Full screen (f)
Deck 1: Java Programming: HTTP Protocol, Scripting Tasks, and Data Access
1
The __________tier processes HTTP protocol, scripting tasks, performs calculations, and provides access to data.
A) Client
B) Applications/Web server
C) Enterprise server
D) DBA
A) Client
B) Applications/Web server
C) Enterprise server
D) DBA
Client
2
_________ are used to identify a user who returns to a Website.
A) Cookies
B) Plug-ins
C) Scripts
D) ASPs
A) Cookies
B) Plug-ins
C) Scripts
D) ASPs
Cookies
3
Which one of the following objects is passed to a Java Bean when one of its properties is set via a JSP action?
A) Servlet Request
B) Http Servlet Request
C) Servlet Response
D) Http Servlet Response
A) Servlet Request
B) Http Servlet Request
C) Servlet Response
D) Http Servlet Response
Servlet Response
4
Struts framework is based on
A) Servlet. JSP and Java
B) Servlet,. HTML and Java
C) Servlet JSP, XML and Java
D) Applet, XML and Java
A) Servlet. JSP and Java
B) Servlet,. HTML and Java
C) Servlet JSP, XML and Java
D) Applet, XML and Java
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
5
Action Servlet, Request Processor and Action classes are the components of
A) View
B) Model
C) Deployment
D) Controller
A) View
B) Model
C) Deployment
D) Controller
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
6
Which of the following delegates the request handling to the Request Processor instance?
A) Action Servlet
B) Action class
C) Deployment descriptor
D) None of the above
A) Action Servlet
B) Action class
C) Deployment descriptor
D) None of the above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
7
How many instances can be created per application module by the Request Processor class?
A) Four
B) Three
C) One
D) Uncountable instances
A) Four
B) Three
C) One
D) Uncountable instances
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
8
An instance of Action is invoked by
A) ActionServlet
B) ActionListener
C) RequestProcessor
D) All of above
A) ActionServlet
B) ActionListener
C) RequestProcessor
D) All of above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
9
What declarations are required for every Java application?
A) A class and the main( ) method declarations.
B) A class with void method
C) A class with main method
D) A class with init method
A) A class and the main( ) method declarations.
B) A class with void method
C) A class with main method
D) A class with init method
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
10
What is a compilation unit?
A) Java Byte code
B) Java source code file
C) Source code
D) Java Exe
A) Java Byte code
B) Java source code file
C) Source code
D) Java Exe
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
11
In order for a source code file, containing the public class Test, to successfully compile, which of the following must be true?
A) It must have a package statement
B) It must be named Test. java
C) It must import java. lang
D) It must declare a public class named Test
A) It must have a package statement
B) It must be named Test. java
C) It must import java. lang
D) It must declare a public class named Test
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
12
What are identifiers and what is naming convention?
A) Identifiers are used for class names
B) Identifiers are used for class names, method names
C) Identifiers are used for class names, method names and variable names.
D) None of above
A) Identifiers are used for class names
B) Identifiers are used for class names, method names
C) Identifiers are used for class names, method names and variable names.
D) None of above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
13
What is the return type of program's main( ) method?
A) Void main()
B) Init
C) Void
D) Run
A) Void main()
B) Init
C) Void
D) Run
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
14
What is the value of a[3] as the result of the following array declaration?
A) 1
B) 2
C) 3
D) 4
A) 1
B) 2
C) 3
D) 4
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
15
Which of the following are primitive types?
A) byte
B) String
C) integer
D) Float
A) byte
B) String
C) integer
D) Float
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
16
What is the range of the char type?
A) 0 to 216
B) 0 to 215
C) 0 to 216-1
D) 0 to 215-1
A) 0 to 216
B) 0 to 215
C) 0 to 216-1
D) 0 to 215-1
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
17
What are primitive data types?
A) byte, short, int, long
B) float, double
C) boolean
D) char
A) byte, short, int, long
B) float, double
C) boolean
D) char
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
18
What are default values of different primitive types?
A) int - 0
B) short - 0
C) byte - 0
D) long - 0 l
A) int - 0
B) short - 0
C) byte - 0
D) long - 0 l
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
19
How do we change the values of the elements of the array?
A) The array expression
B) The array subscript expression can be used to change the values of the elements of the array.
C) The definition of element
D) The definition & declaration of element array
A) The array expression
B) The array subscript expression can be used to change the values of the elements of the array.
C) The definition of element
D) The definition & declaration of element array
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
20
Which of the following features are common to both Java & C++?
A) The class declaration
B) The access modifiers
C) The encapsulation of data & methods with in objects
D) All of above
A) The class declaration
B) The access modifiers
C) The encapsulation of data & methods with in objects
D) All of above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
21
Which of the following statements accurately describe the use of access modifiers within a class definition?
A) They can be applied to both data & methods
B) They must precede a class's data variables or methods
C) They can appear in any order
D) All of above
A) They can be applied to both data & methods
B) They must precede a class's data variables or methods
C) They can appear in any order
D) All of above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
22
Which of the following statements can be used to describe a public method?
A) It is accessible to all other classes in the hierarchy
B) It represents the public interface of its class
C) All of above
D) None of these
A) It is accessible to all other classes in the hierarchy
B) It represents the public interface of its class
C) All of above
D) None of these
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
23
Which of the following statements correctly describes the relation between an object and the instance variable it stores?
A) Each new object has its own distinctive set of instance variables
B) Each object has a copy of the instance variables of its class
C) The instance variable of each object are separate from the variables of other objects
D) All of above
A) Each new object has its own distinctive set of instance variables
B) Each object has a copy of the instance variables of its class
C) The instance variable of each object are separate from the variables of other objects
D) All of above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
24
What are the functions of the dot(. ) operator?
A) It enables you to access instance variables of any objects within a class
B) It enables you to store values in instance variables of an object
C) It is used to call object methods
D) All of above
A) It enables you to access instance variables of any objects within a class
B) It enables you to store values in instance variables of an object
C) It is used to call object methods
D) All of above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
25
When may a constructor be called without specifying arguments?
A) When the default constructor is not called
B) When the name of the constructor differs from that of the class
C) When there are no constructors for the class
D) None of above
A) When the default constructor is not called
B) When the name of the constructor differs from that of the class
C) When there are no constructors for the class
D) None of above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck