when i write the following code the results tell me that no mainmethods, applets or MIDlets found in file:

import java.io.*; 
public class Appliance 
{ NIIT Developing Object Based Applications in Java Assignment A.9 
public static void main(String args[]) 
{ 
try 
{ 
File file=new File("Name.txt"); 
FileReader f=new FileReader(file); 
int ch; 
while((ch=f.read()) 
{ 
System.out.print((char)ch); 
} 
} 
catch(FileNotFoundException fnfe) 
{ 
System.out.println("Exception: "+fnfe.toString()); 
} 
catch(IOException ioe) 
{ 
System.out.println("Exception: "+ioe.toString()); 
} 
} 
}

First of all, properly format your code. How do you expect anyone to read that?

Not to mention that that what you have will not compile, at all, since this

{ NIIT Developing Object Based Applications in Java Assignment A.9

is definately invalid code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.