Your browser does not support JavaScript!
FollowingApe just signed up and they study Marketing Management 📈
CompletePike just signed up and they study Hotel Management 🏨
PunyRoadrunner just signed up and they study Information Technology 👩‍💻
ProminentPigeon just signed up and they study Information Technology 👩‍💻
FaithfulMouse just signed up and they study Information Technology 👩‍💻
DefensiveKingfisher just signed up and they study Hotel Management 🏨
EverydaySloth just signed up and they study Hotel Management 🏨
GeneticGuppy just signed up and they study Real Estate Management 🏘️
FeministFelidae just signed up and they study Information Technology 👩‍💻
IdeologicalCanidae just signed up and they study Management Information System ℹ️

Computer Programming 2

Showing 1-75 of 146 answers

__________ is implemented in at least two classes with inheritance relationship.  
  • Inheritance
  • None of the options
  • Overriding Correct
  • Polymorphism
  • Overloading
Can we directly compile codes from NetBeans?
  • It depends, if there is a compiler embedded in NetBeans
  • No, we can only write codes in NetBeans
  • Yes, because we can call Java compiler from NetBeans Correct
  • Both A and C are correct
Can we directly compile codes from notepad?
  • Yes, Because we can call Java compiler from notepad
  • It depends, if there is a compiler embedded in Notepad
  • Both A and C are correct
  • No, We can only write codes in Notepad Correct
Declare a two-dimensional integer array named values of size 6 columns and 4 rows.
  • int[ ][ ] values=new int[4][6]; Correct
  • int[ 6][4 ] values=new int;
  • int values=new int[6][4];
  • int[ ][ ] values=new int[6][4];
  • None of the above
Declare and initialize a double data type array named numbers with the following values: 23.35, 34.45, 56.77.
  • double[ ] numbers={2335, 3445, 5677}; Correct
  • double[ ] numbers={"2335, 3445, 5677"};
  • None of the choices
  • double[3] numbers={2335, 3445, 5677};
  • Double[ ] number={2335, 3445, 5677};
It is a template for creating an object?
  • None of the above
  • Object Oriented
  • Method
  • Class Correct
  • Encapsulation
It is the ability of an object to have many forms?
  • Abstraction
  • Polymorphism Correct
  • Inheritance
  • Interface
  • None of the above
It is the method of hiding certain elements of the implementation of a certain class?
  • Encapsulation Correct
  • Class
  • Object
  • None of the above
  • Object Oriented
JVM is responsible for
  • Generating bytecode
  • None of the Above
  • Compiling source code
  • Interpreting bytecode Correct
  • Reading bytecode
Multiple-Choice. Please select the best answer for the question.Which of the following has the correct form for an if statement?
  • none of the above
  • if boolean_expression
  • if { boolean_expression }
  • boolean_expression
  • if (boolean_expression) Correct
Multiple-Choice. Please select the best answer for the question.Which of the following is not a Java Literal?
  • Boolean value
  • Integer value
  • None of the above Correct
  • Float value
  • Character value
Since Java uses a virtual machine, what does that mean about the versatility of Java?
  • None of the Above
  • It can run most anywhere without modification Correct
  • Code Security
  • It is used almost exclusively on Intel platforms
  • It will run on Windows, Linux, Unix, but not Apple
The __________ keyword allocates memory for the array being declared.
  • new Correct
  • array
  • int
  • intArray
  • None of the above
The Java feature, "write once, run anywhere", is termed as
  • Object Oriented
  • None of the Above
  • Platform independent Correct
  • High Performance
  • Robust
The length of an array is established when the array is created at __________.
  • None of the above
  • runtime Correct
  • initialization
  • compile time
  • declaration
Use the __________ statement when traversing through arrays.
  • whilewhile loop
  • switch
  • do-while loop
  • for loop Correct
  • none of the choices
What do you call a blueprint of an object?
  • Object
  • None of the above
  • Class Correct
  • Constructor
  • Method
What do you call a class that inherits a class?
  • Parent class
  • Class
  • Superclass
  • Subclass Correct
  • None of the above
What do you call a variable that belong to the whole class?
  • None of the above
  • Class Variable Correct
  • Class Method
  • Static Variable
  • Object Variable
What does Java generate after compiling the java source code?
  • Class Code
  • Image file
  • Executable file
  • None of the Above
  • Byte Code Correct
What is floating-point literal?
  • Can be express in scientific notation
  • All of the above Correct
  • An integer literal with decimal point
  • By default it is double type
  • It could be double or float value
What is the correct statement to compile Java program in command line?
  • javac HelloWorld
  • java HelloWorldjava
  • javac HelloWorldjava Correct
  • java HelloWorld
What is the correct statement to run Java program in command line?
  • None of the Above
  • java HelloWorld Correct
  • javac HelloWorldjava
  • java HelloWorldjava
  • javac HelloWorld
What is the correct statement to set javac path in command line?
  • None of the Above
  • set path=C:\Program Files\Java
  • All of the above
  • javac
  • set path
  • C:\Program Files\Java\jdk160_23\bin
  • path=C:\Program Files\Java\jdk160_23\bin Correct
What is the extension name of a Java Source code?
  • j
  • None of the Above
  • java Correct
  • class
  • javac
What is the input for Java Compiler?
  • Code
  • Byte Code
  • Native Code
  • Source Code Correct
  • None of the Above
What is the name of this method: int test(){return 1;} ?
  • 7
  • None of the choices
  • int
  • 6
  • test Correct
What is the result if we execute this: =E2=80=9Ca=E2=80=9D instanceof String; ?
  • The code is not valid
  • false
  • true Correct
  • =E2=80=9Ca=E2=80=9D
  • None of the above
What is the result if we execute this: =E2=80=9Ca=E2=80=9D.equals(=E2=80=9Ca=E2=80=9D);?
  • false
  • =E2=80=9Ca=E2=80=9D
  • true Correct
  • None of the above
  • The code is not valid
What is the return type of this method: int test(){return 1;} ?
  • test()
  • 1
  • None of the above
  • void
  • int Correct
What is the return value of this method: int test(){return 1;} ?
  • test
  • All of the choices
  • int
  • return 1
  • 1 Correct
What keyword is used to perform class inheritance?
  • extends Correct
  • derives
  • inherits
  • implements
  • None of the above
What type of value does the nextLine() returns?
  • None of the above
  • Line
  • double
  • String Correct
  • long
Search
All courses