Can you answer in this java programming quiz? just 1 or 2 answers are fine..
1. The != operator is used to evaluate _______ between two values.
Non-equality
!!
=!
Equality
2. The interface part of a class is created using
package access
protected visibility
private visibility
3. User defined data type or objects (like a Car class object) are passed by
Reference
Value
Copy
Placement
5 . If you declare constructors private, they ________ be called by all classes and methods to create objects.
Can
can privately
can virtually
Can t
6. Components are placed in a container by calling the __________ method.
registerComponent ()
addActionListener ()
setLayout ()
add ()
7. If an abstract method is not defined in a subclass, the subclass is
Abstract
Overridden
Promoted to the superclass
Hidden
8. Subclass objects of different type that inherit from the same superclass
Can be treated as superclass objects
Can't share private superclass data
Don't share the same superclass data
Don't share any data
9. Polymorphism
Promotes and allows sharing of data and methods between classes
Allows development of general solutions and the runtime selection of methods
Prevents methods outside a class from directly accessing instance variables
Allows classes to contain/combine both data (properties) and methods (behaviors)
10. Inheritance relationships form _________.
Hierarchical Structures
Peer to Peer Networks
Loosely bounded sets
Network Structures
11. Your program class that inherits from JPanel ____________.
Uses a constructor to initialize objects
Inherits the behavior of a JObject program
Is unable to override paint_component ()
Knows nothing of drawing
12. The paint_component method ___________.
Must be private
Expects a Graphics object argument
Never calls super.paint_component (g)
Must be called by you
13. Successful use of polymorphism depends on
Identifying generic methods
Identifying an inheritance class composition
Identifying abstract objects
Deciding on how to use subclass references
14. A superclass method can be overridden in a subclass in order to
Change the name
Make the method private
Provide new behavior appropriate to the subclass
Allow hidden access
16 . In order to place subclass objects of different type in an array
They must inherit from the same subclass
The array reference itself must be of superclass type
You must cast and add-in missing superclass members
They must be of the same type
17. The name of the event handler method of the ActionListener interface is ____.
itemStateChanged
mouseMoved
actionPerformed +
keyPressed
18. Downcasting
Converts a subclass reference to a superclass reference
Converts a subclass object to a superclass object
Converts a superclass reference to a subclass reference
Converts a superclass object to a subclass object
19. A simple layout manager is the ____ manager.
GridLayout
BoxLayout
FlowLayout
PanelLayout
20. An individual array element is accessed using its _________.
Type
Subscript/Index
Value
Object
21. Since it generates byte codes, the Java compiler is _________.
An interpreter
Not a true compiler
Object code
Windows instructions
22. When GUI components are displayed on the screen, a/an ___________ positions and displays those components.
Layout manager
Container object
Event handler
Interface class
23. An executing program class must contain a/an
Body
Main method
Instance variable
Comment
24. Referring to a superclass object through a subclass reference
Can cause a runtime error
Requires that the superclass reference refers to the same subclass object as the cast
Requires an explicit object to avoid the compilation error
25. Polymorphism works for
Unrelated classes
Overloaded classes
An inheritance hierarchy of classes
Has-a classes
26. Given that a=4, b=10, c=2, d=5, and x=3, the expression "(a + c) / c * d + a" evaluates to
20
4
128
19+
27. When dynamic binding takes place, the Java system
Determines the type of the object at compile time
Binds a method name to its address at runtime
Moves up the inheritance hierarchy
Makes a list of generic event handlers
28. When dynamic binding takes place, the Java system
Determines the type of the object at compile time
Binds a method name to its address at runtime
Moves up the inheritance hierarchy
Makes a list of generic event handlers
29. If a subclass constructor explicitly calls a superclass constructor
It overrides the superclass constructor
It must call the noarg constructor
It cannot access protected data
The call must be the first line of code
30. The composition relationship can be identified as a/an _________ relationship.
Enduring
Has/a
Is/a
Overridden
31. When declared with a static lifetime,
Variables exist during the execution of a method
Variables exist from beginning to end of program execution
Methods and instance variables are visible
Variables declared outside the {} of a block
32. When an array is passed as an argument to a method, _____.
The array is passed by reference
Only the first value is passed
The called method can't change array values
It is passed by value
33. When the expression "result = total + input * 2;" is evaluated the __________ is placed in the location of the left hand side.
Left side result
Assignment
Right side result
Operator
34. When invoked, a subclass constructor
Automatically calls the noarg constructor of the superclass (if one is not explicitly called)
Cannot access superclass data even if protected
Returns a superclass object
Does not use the superclass constructor
35. When declared with automatic scope,
Variables exist during the execution of a method
Variables exist from beginning to end of program execution
Methods and instance variables are visible
Variables declared outside the {} of a block
36. The inheritance class relationship
Promotes and allows sharing of data and methods between classes
Allows development of general solutions and the runtime selection of methods
Prevents methods outside a class from directly accessing instance variables
Allows classes to contain/combine both data (properties) and methods (behaviors)
37. When a subclass method has the same name and type as a superclass method but accepts different arguments, that's an example of
Protected inheritance
Overriding
Polymorphism
Overloading
38. When you want to declare constant values, you would use the ________ keyword.
objects
final
const
Static variables
39. The toString method
Is not provided by class Object
Is called implicitly to convert an object to a String
Can be overloaded
Can't be overridden
40. A switch statement tests a variable or expression against __________.
Constant, integral values
Expressions
Decimal numbers
Strings
41. Reffering to a superclass object through a subclass reference
can cause a runtime error
Requires that the superclass reference refers to the same subclass object
Requires an explicit object to avoid the compilation error
48. Because all variables must be declared before their use, Java
Is an object oriented language
Is a strong variable language
Is a strongly typed language
Is a typing language
49. Variables declared/defined inside a method are
General variables
Visible everywhere
Local variables
Instance variables
50. The while statement
Is the most specific form of repetition
Requires initialization, test, and change of a control variable
Will never skip execution of the loop body
Doesn't use a control variable
51. The do-while statement
Does not require a test of cond
Is the most specific form of repetition
Executes at least once
Is intended to replace for statements
52. The use of superclass references to refer to subclass objects has been found useful
For container objects
When placing elements of subclass objects in a superclass array
When placing elements of superclass objects in a subclass array
For Composition classes
53. Overloaded constructors are used to
Create different types of objects
Create two dimensional arrays
Create primitive data types
Initialize objects of the same class in different ways
54. Java's mechanism for placing related classes in a subdirectory uses the ________ keyword.
package
import
extensible
extends
55. this
is a reference to an object
Can t be used to access object data
Is passed to every class
Is hidden and private
56. An anonymous inner class ____.
Has a class name
Typically is used to define an event handler class
Has no scope
Contains anonymous methods
57. The new operator is used to __________.
Allocate memory for an object or array
Call an object destructor
Call the garbage collector
Promote visibility
58. The drawOval method takes the same four arguments as ________.
drawLine ()
drawPoly ()
drawRect ()
fillArc ()
59. In order for a class method to access the private data of a class object (not of its class)
The data can only be read
It can't
The data can be changed directly
get/set methods must be used
Question 62
62. Class methods ________ access all class variables, public or private.
Can
Can't
64. A reference in a Java program
Causes object initialization
Refers or points to a runtime data type
Causes memory allocation
Refers (or points to) to an object
65. The listener interface for radio buttons is the ____ interface.
ActionListener
MouseListener
KeyListener
ItemListener
66. implementation part of a class is created using
67. What types of superclass methods/variables can be directly accessed from a sub class?
public
private
provoked
68. The statement(s) in the body of an if structure should be indented in order to
Compile properly
They shouldn t
Stand out and enhance readability
Allow repetition
69. The sdk program that is the JVM and runs programs is
java
javac
appletviewer
a Java application is a program written with the very popular porgramming language (Java). the Java programs can run on any operating system (windows,linux,mac...etc) and also it can be run on mobile devices too. in order to the java application to run,it needs to have JRE(Java Runtime Enviroment)installed on the device that it will run on.
Eclipse is not a language. It is an Integrated Development Environment (IDE). These are tools designed to allow you to easily and quickly write, run, test, and debug code for various programming languages.There are versions of the Eclipse IDE for: Java, C/C++, and PHP.
what is triple jump test?
They end with an extension .java Test.java would be a java source file. The contents of Test.java could be package xyz; import java.util.*; public class Test { ... ... .. . . }
A good program display a model of human cells, and test different mutations.
a Java application is a program written with the very popular porgramming language (Java). the Java programs can run on any operating system (windows,linux,mac...etc) and also it can be run on mobile devices too. in order to the java application to run,it needs to have JRE(Java Runtime Enviroment)installed on the device that it will run on.
To test whether Java is installed and enabled in Firefox, visit one of these Java test pages:Verify Java VersionVerify Java Version(alternate)When you visit these pages, you will normally need to activate Java. The article How to allow Java on trusted sites explains how.
No
Eclipse is not a language. It is an Integrated Development Environment (IDE). These are tools designed to allow you to easily and quickly write, run, test, and debug code for various programming languages.There are versions of the Eclipse IDE for: Java, C/C++, and PHP.
The Final Test was created in 1953.
Extreme Programming: Extreme Programming is when you design the test cases first, and then program backwards. This creates an easier to use programming flow.
The duration of The Final Test is 1.5 hours.
what is triple jump test?
clicking something will be picked up by java script event, it will send request to the server, this usually takes place using AJAX or any other programming language which will process the answer and checks against the stored results.
All Java programs would have a constructor... public class Test { public Test(){ ... } ..... } This is a constructor. Even if you dont code the constructor Java would automatically place a default constructor for compilation.
There are several Java frameworks that can be used for building apps on AWS Lambda, including: Spring Cloud Function: a framework that allows you to write serverless functions in Java, with support for AWS Lambda. Micronaut: a lightweight framework that can be used to build serverless applications on AWS Lambda, with support for reactive programming. Quarkus: a Java framework that provides fast startup times and low memory usage, making it well-suited for building serverless applications on AWS Lambda. AWS Serverless Application Model (SAM): a framework provided by AWS that allows you to build, test, and deploy serverless applications on AWS Lambda, with support for Java and other programming languages. Overall, these frameworks can help simplify the process of building Java applications on AWS Lambda, and provide features such as support for API Gateway and other AWS services. jai Infoway
The Final Test - 1914 was released on: USA: 25 September 1914