0

programming languages Online Quiz - 176

Description: programming languages Online Quiz - 176
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0

package simplejava; public class TestMain { TestMain() { System.out.println("I am in Constructor"); } TestMain(String message) { System.out.println("Message " + message); } public static void main(String[] args) { TestMain tm = new TestMain(); } public static void main(String args) { TestMain tm = new TestMain("Hello"); } }

  1. Compiler Error

  2. I am in Constructor

  3. Message Hello

  4. Exception


Correct Option: B

package simplejava; public class TestMain1 { TestMain1() { System.out.println("I am in Constructor"); } TestMain1(String message) { System.out.println("Message " + message); } public void main(String[] args) { TestMain1 nm = new TestMain1(); TestMain1 nm1 = new TestMain1("Hello"); } }

  1. Exception

  2. Compiler Error

  3. I am in Constructor

  4. Message Hello


Correct Option: A

package simplejava; public class TestConstructor1 { int p; TestConstructor1() { System.out.println("I am in Constructor"); } TestConstructor1(int p) { this.p =p; System.out.println("p = "+p); this(); } public static void main(String[] args) { TestConstructor1 tp1 = new TestConstructor1(10); } }

  1. Exception

  2. Compiler Error

  3. p = 0

  4. p=10


Correct Option: B

package simplejava; public class TestConstructor2 { int p; TestConstructor2() { System.out.print(" I am in Constructor"); } TestConstructor2(int p) { this(); this.p = p; System.out.print(" p = " + p); } public static void main(String[] args) { TestConstructor2 tp1 = new TestConstructor2(10); } }

  1. I am in Constructor p = 10

  2. I am in Constructor p = 0

  3. Compiler Error

  4. Exception


Correct Option: A

1) Maximum length of entity name for table space?

  1. 5

  2. 4

  3. 7

  4. 8


Correct Option: D

2) Expand ROW

  1. A) Row of lock

  2. B) Row of locking

  3. C) Row level lock

  4. D) Row level locking


Correct Option: D
  1. A) Descending order

  2. B) Ascending order

  3. C) None

  4. D) Any order


Correct Option: B

4) The output of the function MIN(scalar) is

  1. A) Returns the minimum value in a set of column values

  2. B) Returns the minimum value in a set of row values

  3. C) Returns the minimum value in a set of values

  4. D) None


Correct Option: C

5) RESTRICT Operator is also known as

  1. A) PROJECT Operator

  2. B) SELECT Operator

  3. C) DIFFERENCE Operator

  4. D) INTERSECTION Operator


Correct Option: B

________ is the physical aspect of the computer that can be seen.

  1. Hardware

  2. Software

  3. Operating system

  4. Application program


Correct Option: A
  1. Hardware

  2. Software

  3. Operating system

  4. Application program


Correct Option: A

__________ is the brain of a computer

  1. Hardware

  2. CPU

  3. Memory

  4. Disk


Correct Option: B

Why do computers use zeros and ones?

  1. because combinations of zeros and ones can represent any numbers and characters.

  2. because digital devices have two stable states and it is natural to use one state for 0 and the other for 1.

  3. because binary numbers are simplest

  4. because binary numbers are the bases upon which all other number systems are built.


Correct Option: B

An object is an instance of a __________.

  1. program

  2. class

  3. method

  4. data


Correct Option: B
- Hide questions