Posts

Showing posts from September, 2024

Question program

Image
 import java.lang.*; import java.io.*; class Questions {     public String[][] qpa;     public String[][] qca;     Questions() throws IOException {         qpa = new String[10][5];         // Updated questions and objectives         DataInputStream in = new DataInputStream(System.in);         qpa[0][0] = "What is the default value of an int variable in Java?";         qpa[0][1] = "1. 0.0";         qpa[0][2] = "2. null";         qpa[0][3] = "3. 0";         qpa[0][4] = "4. Undefined";         qpa[1][0] = "Which of these is a loop construct that will always execute at least once?";         qpa[1][1] = "1. for";         qpa[1][2] = "2. while";         qpa[1][3] = "3. do-while";         qpa[1][4] = "4....