A question bank for every class and subject

Practice questions, with answers and explanations included

794 questions available

Refine

All questions

794 results
581

For myString = "Hello World", what does myString.replace('l','*') return?

MCQ Medium
a. He**o Wor*d
b. Hello World
c. HE**O WOR*D
d. He*lo Wor*d
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
He**o Wor*d
Explanation: The replace() method replaces ALL occurrences of the character 'l' with '*', giving 'He**o Wor*d'.
582

Explain the syntax and working of the if-else statement in Java with an example (Vote Eligibility Checker).

LONG Hard
Information Technology (802) · Class 11 · Sep 26, 2026
Show answer
Explanation: Syntax: if (conditionalExpression) { statementBlock1; } else { statementBlock2; } — if the condition evaluates to true, statementBlock1 executes; otherwise statementBlock2 (the else part) executes. Example: if (Integer.parseInt(jTextField1.getText()) >= 18) JOptionPane.showMessageDialog(null,"You are eligible to VOTE"); else JOptionPane.showMessageDialog(null,"You are NOT eligible to VOTE"); — this checks the age entered by the user and displays the appropriate eligibility message.
583

Half-duplex communication mode allows:

MCQ Medium
a. Data transfer in only one direction, always
b. Bidirectional communication, but only one node can transmit at a time
c. Both nodes to send and receive simultaneously
d. No data transfer at all
Information Technology (802) · Class 11 · Sep 26, 2026
Show answer
Bidirectional communication, but only one node can transmit at a time
Explanation: In half-duplex mode, communication is bidirectional, but only one node can transmit data at any given time.
584

Once the Arrays class has sorted an array, the sort is applied in ascending order by default using Arrays.sort().

TRUE FALSE Easy
a. TRUE
b. FALSE
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
TRUE
Explanation: Arrays.sort() sorts an array (of numbers or Strings) in ascending order by default.
585

Which command is typed in the Command Prompt to check a system's IP address and connection details?

MCQ Medium
a. PING
b. IPCONFIG
c. NETSTAT
d. TRACERT
Information Technology (802) · Class 11 · Sep 26, 2026
Show answer
IPCONFIG
Explanation: Typing IPCONFIG in the Command Prompt shows the Connection-specific DNS Suffix, IP Address, etc.
586

The reach of a PAN typically extends up to 10 meters.

TRUE FALSE Easy
a. TRUE
b. FALSE
Information Technology (802) · Class 11 · Sep 26, 2026
Show answer
TRUE
Explanation: A Personal Area Network (PAN) typically has a reach of about 10 meters.
587

The Integer class and its parseInt() method must be manually imported using the import statement, similar to the Scanner class.

TRUE FALSE Hard
a. TRUE
b. FALSE
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
FALSE
Explanation: The Integer class is part of the java.lang package, which is automatically imported into all Java programs by default, so no explicit import statement is needed.
588

Which command is used at the command prompt to check whether the network card is working, using the loopback address 127.0.0.1?

MCQ Medium
a. IPCONFIG
b. PING 127.0.0.1
c. NETSTAT 127.0.0.1
d. TELNET 127.0.0.1
Information Technology (802) · Class 11 · Sep 26, 2026
Show answer
PING 127.0.0.1
Explanation: Typing 'ping 127.0.0.1' at the command prompt tests whether the network card is working; a reply confirms it is functioning.
589

NIC (Network Interface Card) generally supports full-duplex mode for networking.

TRUE FALSE Medium
a. TRUE
b. FALSE
Information Technology (802) · Class 11 · Sep 26, 2026
Show answer
TRUE
Explanation: The NIC on systems for networking supports full-duplex mode, allowing simultaneous sending and receiving of data.
590

Write the two lines of code needed to create a Scanner object that reads from the console and stores a name entered by the user.

SHORT Easy
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
Explanation: Scanner user_input = new Scanner(System.in); String name = user_input.next();
591

The cable that connects the network card in a computer to a network point on the wall is called the:

MCQ Medium
a. Patch panel
b. Fly lead
c. NIC bridge
d. Backbone cable
Information Technology (802) · Class 11 · Sep 26, 2026
Show answer
Fly lead
Explanation: The fly lead is the cable connecting the network card to a network point, usually on the wall.
592

Data that has not been processed to reveal useful meaning is called:

MCQ Easy
a. Information
b. Data
c. Metadata
d. A Query
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
Data
Explanation: Data is a collection of raw facts which have not been processed to reveal useful information.
593

Write Java code to declare an array of 5 doubles with values {103, 144, 256.5, 346, 387.5}, sort it using the Arrays class, and then print the lowest and highest marks.

LONG Medium
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
Explanation: import java.util.Arrays; double[] marks = {103, 144, 256.5, 346, 387.5}; Arrays.sort(marks); System.out.println(marks[0]); // lowest System.out.println(marks[marks.length-1]); // highest
594

If a system shows 'Media State: Media disconnected' after running IPCONFIG, it means the system is connected to the Internet.

TRUE FALSE Medium
a. TRUE
b. FALSE
Information Technology (802) · Class 11 · Sep 26, 2026
Show answer
FALSE
Explanation: 'Media State: Media disconnected' indicates the system is NOT connected to a network.
595

Which of the following best describes 'Information'?

MCQ Easy
a. Raw unprocessed facts
b. Data produced by processing raw facts to reveal meaning
c. A collection of tables
d. A database query
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
Data produced by processing raw facts to reveal meaning
Explanation: Information is produced by processing data, revealing something meaningful (e.g. average marks computed from individual student marks).
596

An unexpected error situation during program execution that causes it to terminate abnormally is called:

MCQ Easy
a. A syntax error
b. An exception
c. A comment
d. A constructor
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
An exception
Explanation: An exception is an error situation, unexpected during program execution, that causes abnormal termination if not handled.
597

Turning off unused program services from Startup can help speed up a slow computer.

TRUE FALSE Easy
a. TRUE
b. FALSE
Information Technology (802) · Class 11 · Sep 26, 2026
Show answer
TRUE
Explanation: Disabling unused program services that run at startup can prevent unnecessary background load and speed up the system.
598

Which of the following is NOT a property of a database?

MCQ Medium
a. It represents some aspect of the real world (mini-world)
b. It is designed and built for a specific purpose
c. It must always be very small in size
d. It can be maintained manually or be computerized
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
It must always be very small in size
Explanation: A database can be of any size and complexity; there is no requirement that it must be small.
599

Which of these would cause a runtime exception in Java?

MCQ Medium
a. Declaring a variable
b. Dividing an integer by zero
c. Writing a comment
d. Creating an object
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
Dividing an integer by zero
Explanation: Dividing an integer by zero causes an ArithmeticException at runtime; this does NOT happen with floating point division (which results in Infinity).
600

What is Disk Defragmentation and why is it needed?

SHORT Medium
Information Technology (802) · Class 11 · Sep 26, 2026
Show answer
Explanation: Disk Defragmentation is a process that reclaims gaps/spaces created in files stored on the hard disk over time, which otherwise makes files take more space and can slow down the computer. It is run via Local Disk Properties > Tools tab > Defragment now.