The moose likes Java in General and the fly likes max no of line in a java file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "max no of line in a java file" Watch "max no of line in a java file" New topic
Author

max no of line in a java file

mohanasundaram muthukannan
Ranch Hand

Joined: May 29, 2008
Posts: 35
Dear All,

How much lines maximum in a .java file?

Thanks and Regards,
Mohana sundaram.M

Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

There isn't any. But there is a maximum size for a method which is 64KB. But that is compiled code.


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Thakur Sachin Singh
Ranch Hand

Joined: Jun 15, 2010
Posts: 209

i think there is no limitation for line of code in file


my blog SCJP 6- 91%, IBM DB2, IBM RAD Certified
Mohamed Sanaulla
Bartender

Joined: Sep 08, 2007
Posts: 2925
    
  15

mohanasundaram muthukannan wrote:Dear All,

How much lines maximum in a .java file?

Thanks and Regards,
Mohana sundaram.M



Its always better to keep One class per .java file.


Mohamed Sanaulla | My Blog
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 32599
    
    4
The figures given come from the JVM Specification. Look for ยง4.10
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

Mohamed Sanaulla wrote:Its always better to keep One class per .java file.
Why?? How about inner and anonymous classes?
Mohamed Sanaulla
Bartender

Joined: Sep 08, 2007
Posts: 2925
    
  15

Wouter Oet wrote:
Mohamed Sanaulla wrote:Its always better to keep One class per .java file.
Why?? How about inner and anonymous classes?


Those go with in the class To be specific- One Outer class. Reason- If I want to search- a class- MyClass- I would know that it will be in MyClass.java.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: max no of line in a java file
 
Similar Threads
about java decompiler
conversion
Hi, All SCJP Candidate help me
please help me out.. exam tomorrow
Failed to marshal exception problem