Posts

Pgm 2

Image
import java.io.*; import java.util.Scanner; class FS {     public static void main(String[] args) {         Scanner scanner = new Scanner(System.in);         String fileName = "msc1.txt";         int choice;         do {             System.out.println("\nFile Operations Menu:");             System.out.println("1. Create a File");             System.out.println("2. Write to the File");             System.out.println("3. Read from the File");             System.out.println("4. Update the File");             System.out.println("5. Delete the File");             System.out.print("Enter your choice: ");             choice = scanner.nextInt();       ...

Questions

 import java.lang.*; import java.io.*; class Questions{ public String [][]qpa; public String[][]qca;  Questions()throws IOException { qpa=new String[10][5]; //questionsandobjectives// DataInputStream in=new DataInputStream(System.in); qpa[0][0]="1.which of the following options leads to the portability and security of java?"; qpa[0][1]="1.Bytecode is executed by JVM"; qpa[0][2]="2.The applet makes the java code secure and portable"; qpa[0][3]="3.use of exception handling";qpa[0][4]="4.Dynamic binding between objects"; qpa[1][0]="2.which of the following is not a java features"; qpa[1][1]="1.Dynamic"; qpa[1][2]="2.Architecture neutral"; qpa[1][3]="3.object oriented"; qpa[1][4]="4.use of pointers"; qpa[2][0]="3.Which keyword is used for accessing the features of a package"; qpa[2][1]="1.package"; qpa[2][2]="2.import"; qpa[2][3]="3.extends"; qpa[2][4]...