Question
public class File { public static void main(String args[])throws java.io.FileNotFoundException{ java.io.File file = new java.io.File(Ahmad Alsubhi.txt); java.io.PrintWriter output = new java.io.PrintWriter(file); output.print(Name : Ahmad Al
public class File {
public static void main(String args[])throws java.io.FileNotFoundException{
java.io.File file = new java.io.File("Ahmad Alsubhi.txt");
java.io.PrintWriter output = new java.io.PrintWriter(file);
output.print("Name : Ahmad Al subhi Stuent Id : 2040042 Grades : 93 Database 90 Advanced Programmi System Analysis 90"); output.close();
java.util.Scanner input = new java.util.Scanner(file); String name = input.next(); while(input.hasNextLine()){ name +=input.nextLine() + " "; }
System.out.print(name);
input.close();
} }
Question 1 :
Write a new version of the previous java code that allows introducing the file content by using a graphical interface.
Please Help
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started