Results 1 to 3 of 3
  1. #1
    khoilh is offline Member
    Join Date
    Oct 2009
    Posts
    1
    Rep Power
    0

    Default Repair source code content....!!!

    Hi everybody!.
    I have a problem need to be helping!.
    I have a java source code but the contents in this source code not to be right format, every statement in a single line. It's very difficult for viewer.
    ex:
    Java Code:
    .......
    public class ReadFile 
    {
    public static void main(String args[]) throws IOException
    {
    		int i;
    	FileInputStream fin;
    		try 
    {
    			fin = new java.io.FileInputStream("a.txt");
    } 
    catch(FileNotFoundException exc) 
    {
    		System.out.println("File Not Found");
    			return;
    }
    		
    do 
    {
    i = fin.read();
    			if(i != -1) 
    	System.out.print((char) i);
    } 
    while(i != -1);
    fin.close();
    }
    }
    I want to repair it for viewers have more easy to read. Please tell me how to coding a programing to resolve this problem!.
    Any help is highly appreciated. Thanks!.
    Last edited by Fubarable; 10-02-2009 at 11:15 PM. Reason: code tags added to aid in readability

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,453
    Rep Power
    20

    Default

    Your question is not clear, but this may help:
    Code Conventions for the Java(TM) Programming Language: Contents

    db

  3. #3
    emceenugget is offline Senior Member
    Join Date
    Sep 2008
    Posts
    564
    Rep Power
    7

    Default

    s/he is probably looking for a tool to do the formatting for him/her. i'd advise just doing it yourself if there isn't too much to go through.

Similar Threads

  1. Replies: 1
    Last Post: 11-28-2008, 07:27 PM
  2. Help me out in compiling the source code
    By aks.nitw in forum Advanced Java
    Replies: 3
    Last Post: 10-17-2008, 09:33 AM
  3. source code of 'javac'?
    By Pooja Deshpande in forum Advanced Java
    Replies: 2
    Last Post: 06-04-2008, 12:24 PM
  4. how to convert source code to xml
    By valery in forum XML
    Replies: 2
    Last Post: 08-06-2007, 09:29 PM
  5. Need a source code
    By vissu007 in forum New To Java
    Replies: 1
    Last Post: 07-05-2007, 08:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •