0
Alien head

programming languages Online Quiz - 93

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

An applet will run in almost any browser because...

  1. The server has a built-in JVM.

  2. The browser has a built-in JVM.

  3. The source code is interpreted by the browser.

  4. Applets don''t need a JVM.


Correct Option: B

A program written in the Java programming language can run on any platform because...

  1. Java programming is derived from C++.

  2. The Java Virtual Machine(JVM) interprets the program for the native operating system.

  3. The compiler is identical to a C++ compiler.

  4. The APIs do all the work.


Correct Option: B

When a program class implements an interface, it must provide behavior for...

  1. Two methods defined in that interface.

  2. Only certain methods in an interface.

  3. All methods defined in that interface.

  4. Any methods in a class.


Correct Option: C

Servlets are typically used for...

  1. Create a JVM for applets.

  2. Extending a web server by providing dynamic web content.

  3. Storing information in applets.

  4. Loading buttons and menus.


Correct Option: B

When a program class implements an interface, it must provide behavior for...

  1. Two methods defined in that interface.

  2. All methods defined in that interface.

  3. Only certain methods in an interface.

  4. Any methods in a class.


Correct Option: B

Servlets are typically used for...

  1. Extending a web server by providing dynamic web content.

  2. Create a JVM for applets.

  3. Storing information in applets.

  4. Loading buttons and menus.


Correct Option: A

A program written in the Java programming language can run on any platform because...

  1. Java programming is derived from C++.

  2. The compiler is identical to a C++ compiler.

  3. The APIs do all the work.

  4. The Java Virtual Machine(JVM) interprets the program for the native operating system.


Correct Option: D

What is an Applet?

  1. An interactive website

  2. A Java program that is run through a web browser

  3. A type of computer

  4. Java method


Correct Option: B

Which method will a web browser call first on a new applet?

  1. main method.

  2. start method.

  3. init method.

  4. run method


Correct Option: C

What is Java?

  1. A type of coffee

  2. An object-oriented programming language

  3. A Structured Programming language

  4. An interactive website


Correct Option: B

Java runs on _______.

  1. Windows

  2. Unix/Linux

  3. Macs

  4. All of the Above


Correct Option: D

The BorderLayout class provides static fields for...

  1. Introducing new methods.

  2. Adding components to specific areas of a container.

  3. Starting an applet.

  4. Specifying font size and color.


Correct Option: B

An applet will run in almost any browser because...

  1. The server has a built-in JVM.

  2. The browser has a built-in JVM.

  3. The source code is interpreted by the browser.

  4. Applets don''t need a JVM.


Correct Option: B

What is the advantage of using import statements?

  1. To avoid having to declare variables.

  2. To refer to a class without using prefixes.

  3. To avoid calling methods.

  4. To import the images you want to use.


Correct Option: B

The command mkfs is used for ?

  1. to build a Linux file system on a device,

  2. to simply combine a few files into a single file

  3. to run a process in background

  4. None


Correct Option: A

Output of the following program ? #!/user/bin/sh x=22 y=28 z=5 ((z =x+y + z)) echo $z

  1. Shows error at line 2

  2. Shows error at line 3

  3. 55

  4. Wont display any value


Correct Option: C

The brk() system call is used for the following process management

  1. To bias the existing priority of a process

  2. To get parent process identifier

  3. To increase/decrease the data segment size of a process

  4. To create a new process


Correct Option: C

n below mentioned nice values of the processes, which is having the highest priority ?

  1. -20

  2. -1

  3. 2

  4. 20


Correct Option: A

Predict the output of the following program code

  1. Hello World prints 3 times

  2. Hello World prints 4 times

  3. Hello World prints 8 times

  4. Hello World prints 9 times


Correct Option: C

The shell metacharacter $# represents ?

  1. No of arguments supplied to the shell script

  2. Total no of files in the current directory

  3. Total no of users who have logged in

  4. Total no of processes running in background


Correct Option: A
+ View questions