0
Alien head

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

An object is an instance of a __________.

  1. program

  2. class

  3. method

  4. data


Correct Option: B

_______ is a construct that defines objects of the same type.

  1. A class

  2. An object

  3. A method

  4. A data field


Correct Option: A

__________ represents an entity in the real world that can be distinctly identified.

  1. A class

  2. An object

  3. A method

  4. A data field


Correct Option: B

____________ is a device to connect a computer to a local area network (LAN).

  1. regular modem

  2. DSL

  3. Cable modem

  4. NIC


Correct Option: B

One byte has ________ bits.

  1. 4

  2. 8

  3. 16

  4. 12


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

__________ is the brain of a computer

  1. Hardware

  2. CPU

  3. Memory

  4. Disk


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

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

  1. Hardware

  2. Software

  3. Operating system

  4. Application program


Correct Option: A

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

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

3) ORDER BY in Default arranged in

  1. A) Descending order

  2. B) Ascending order

  3. C) None

  4. D) Any order


Correct Option: B

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) Maximum length of entity name for table space?

  1. 5

  2. 4

  3. 7

  4. 8


Correct Option: D

package simplejava; public class TestConstructor { int p ; public void TestConstructor(int p) { this.p=p; } public static void main(String[] args) { TestConstructor tp = new TestConstructor(10); TestConstructor tp = new TestConstructor(); System.out.println("p = "+tp.p); } }

  1. Compiler Error

  2. Exception

  3. p = 0

  4. p=10


Correct Option: A

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

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 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 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

From the available options, what is the likely outcome from running the code below? (Choose one.) protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { RequestDispatcher dispatcher = getServletContext().getNamedDispatcher("/ServletB"); dispatcher.forward(request, response); }

  1. DispatcherNotFoundException.

  2. Runtime error because of incorrectly formed parameter to getNamedDispatcher() method.

  3. NullPointerException.

  4. ServletB can obtain request attribute javax.servlet.forward.request_uri.


Correct Option: C
+ View questions