Posts

Showing posts from July, 2024

V.Vignesh, P23CS398

Image
 import java.io.*; import java.nio.file.*; import java.util.List; import java.util.stream.Collectors; public class AFO{     // Read file content     public static void readFile(String filePath) throws IOException {         List<String> lines = Files.readAllLines(Paths.get(filePath));         for (String line : lines) {             System.out.println(line);         }     }     // Write content to a file     public static void writeFile(String filePath, String content) throws IOException {         Files.write(Paths.get(filePath), content.getBytes(), StandardOpenOption.CREATE, StandardOpenOption.APPEND);     }     // Copy a file     public static void copyFile(String sourcePath, String destinationPath) throws IOException {         Files.copy(Paths.get(sourcePath), Paths.ge...

V.Vignesh , P23CS398

Image
 import java.lang.*; import java.io.*; class Questions{ public String [][]qpa;  public String[][]qca;  Questions()throws IOException { qpa=new String[10][5]; DataInputStream in=new DataInputStream(System.in); qpa[0][0]="How to run Javaprogram on the command prompt?";  qpa[0][1]="1.javac JavaProgram"; qpa[0][2]="2.java JavaProgram";  qpa[0][3]="3.javac JavaProgram.java"; qpa[0][4]="4.No one"; qpa[1][0]="What is the use of the println method?";  qpa[1][1]="1.It is used to print text on the screen."; qpa[1][2]="2.It is used to print text on the screen with the linebreak.";  qpa[1][3]="3.It is used to read text from keyboard."; qpa[1][4]="4.It is used to read text from a file."; qpa[2][0]="How to read a character from the keyboard?";  qpa[2][1]="1.char c=System.read()"; qpa[2][2]="2.charc=System.in.read()"; qpa[2][3]="3.charc=(char)System.read()"; qpa[...

V.Vignesh , P23CS398

Image
 Name : V.Vignesh  Reg no : P23CS398  Class : II MSC Computer Science   College : Government Arts & Science         College[Autonomous], Kumbakonam - 612   001  F.Name : G.Venkateswaran  Occupation : Car Driver   M.Name : V.Subha  Occupation : Tailor  Annual Income :  Rs.72000/-  Sibling : V.Naveen [BCA]  Blood Group : "A1"+ve  Email ID : vigneshv022002@gmail.com  Religion : Hindu  Caste : BC  Community : Vania Chettiyar  Communication Address : 131,Reddiyar   Street, Anjaruvarthalai, Kuttalam - 609 801   Mayiladuthurai (DT)...  Educational Qualification : 10th standard   (423/500) , 12th standard (425/600)  &   Bsc(CS) with 80 %.. Studied In : AVC COLLEGE (Autonomous),Mannampandal, Mayiladuthurai - 609 001. My All Time Favourites :                   {...