Until how many lines can we  write java file

in java file, how many lines can I write?
Manybe It will depend on file system such as window, unix file system.
but, I don't know the exact size.
please let me know how many lines I can wirte in java file of window and unix file system.
thank you in advance.

A class and method implementation in source lines of code (sans comments and white space) should be as large as necessary, but no larger. Good design principals tend to drive towards smaller peices, but there is no one right size size limit.
Personally, I suspect any method that has over 50 lines of code as being too large and probably refactorable. I also suspect any single class (or for that matter .java file) with more than 50 methods or more than 2000 lines of code as being too large and probably refactorable. But sometimes we might really need a 500 line method or an 8000 line, 200 method class. Maybe its a performance thing. Maybe it is just that complicated and too hard to break up. I doubt it occurs frequently, but I won't be shocked when I see it.
Sometimes GUI classes (Swing and AWT) get really huge. Sometimes this is due to code generation, sometimes its just being sloppy. It pays to know the difference.
But the Java langauge sets reasonable (if not overly generous) limits on bytecode and constant pool sizes If the Java compiler begins to complain that something you have built is is too large, face it, it probably is. It's like running into scope nesting or nested name (class in a class in a class...) size limits - usually not a good sign for the structure of your code.
Chuck

Similar Messages

  • How many lines can you have on a nation wide talk and text plan?

    How many lines can you have on a nation wide talk and text plan?

    A max of five lines is allowed on the Nationwide Talk & Text family plan.

  • How many lines can you have?

    how do get the two family plans or separate individual line?

    Not sure what the question is ... if you have a Share Everything plan, you can have up to 10 lines of service; if you have a Nationwide plan, you can have up to 5 lines of service.

  • How many channels can I write in a same file with the Write Data Module (Dasylab 12.00.00) ?

    I would like to write data from a large number of channel (up to 128) in a same file. Using the write data module, I have up to 16 channels only ! The only solution I found is to save data in 8 different files... Is there any solution to solve this problem ? I use DASYLAB V.12.00.00. Thank you
    Solved!
    Go to Solution.

    Please see this knowledge base article describing how to do it.
    http://kb.mccdaq.com/KnowledgebaseArticle50372.aspx?Keywords=multiplex
    - cj
    Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.

  • PXI-7854R: how many times can bitfile be loaded to FPGA?

    How many times can I reload bit file to my FPGA PXI-7854R?
    I found a related question/answer for 783x but I'd like to know the limitation for PXI-7854R, specifically.
    PXI-7831R http://digital.ni.com/public.nsf/allkb/91DE0C3B7740C287862574D300646369

    For additional "you'll never wear it out fodder": we use Xilinx FPGAs, so their documentation will be the real source of the answer.
    http://forums.xilinx.com/t5/Spartan-Family-FPGAs/How-many-times-I-can-reprogram-my-Spartan-6-device/...
    and, slightly more entertaining discussion on the matter:
    http://forums.xilinx.com/t5/Spartan-Family-FPGAs/How-many-times-can-you-re-program-a-Spartan-device/...
    I guess it's not really "official documentation", but it's the right answer. I couldn't find anything more substantial in the ~10 minutes I looked.
    Cheers!
    TJ G

  • How many lines we can print using Non-alv report list ?

    Hi Experts,
    How many lines we can print using Non-alv report list ?
    regards
    vishnu

    Hi,
    It depends on the page size according to the page size we can set the no. of lines as follows,
    REPORT  program_name   NO STANDARD PAGE HEADING
    LINE-SIZE 290
    LINE-COUNT 65.
    Hope it helps you,
    Regards,
    Abhijit G. Borkar

  • MM: Purchase requisition line Items - How many line items can we use

    Hi all,
    1. Purchase requisition Line items  (How many line items can we use?), is there any restrictions.
    2. While creating PO with only one tax code for the related PR to input Tax code (without selecting  line Items).
    Regards,
    Sudheer

    Hi
    There is no limitation for number of items in PR.
    Tax code is always applicable for individual item only.It cannot be selected form the whole PO.
    Regards
    Dev

  • How many line item dimensions can a fact table have?

    Hi,
    How many line item dimensions can a fact table have? Is it tht Max of 16 dimensions(13+3) .Does the 16 dimensions include line items dimensions as well .
    Pls reply.
    Thanks
    Praveen

    It includes all dimensios, including line item dimensions.
    If you have line item dimension, pl note you cant assign any other characteristic to that dimension.
    Ravi Thothadri

  • How many line items can be entered in sales order(maximum)

    hi,
    how many line items can be entered in sales order(maximum)
    SRK

    Hi SRK,
    The maximum number of line items in a SO or Invoice is 9999.
    Please close the thread if answered.
    regards
    Param

  • How many databases can be opened simultaneously in a single file?

    To all:
    I don't known how many databases can be opened simultaneously in a single file. After my application open 499 databases in a single file simultaneously, DB->open return error 12.(can not allocate memory ?).
    How can i do ? Thanks.

    I found it:
    Berkeley DB Reference Guide:
    Locking Subsystem
         PrevRefNext
    Configuring locking: sizing the system
    The lock system is sized using the following three methods:
    DB_ENV->set_lk_max_locks
    DB_ENV->set_lk_max_lockers
    DB_ENV->set_lk_max_objects
    The DB_ENV->set_lk_max_locks, DB_ENV->set_lk_max_lockers, and DB_ENV->set_lk_max_objects methods specify the maximum number of locks, lockers, and locked objects supported by the lock subsystem, respectively. The maximum number of locks is the number of locks that can be simultaneously requested in the system. The maximum number of lockers is the number of lockers that can simultaneously request locks in the system. The maximum number of lock objects is the number of objects that can simultaneously be locked in the system. Selecting appropriate values requires an understanding of your application and its databases. If the values are too small, requests for locks in an application will fail. If the values are too large, the locking subsystem will consume more resources than is necessary. It is better to err in the direction of allocating too many locks, lockers, and objects because increasing the number of locks does not require large amounts of additional resources. The default values are 1000 of each type of object.
    When configuring a Berkeley DB Concurrent Data Store application, the number of lock objects needed is two per open database (one for the database lock, and one for the cursor lock when the DB_CDB_ALLDB option is not specified). The number of locks needed is one per open database handle plus one per simultaneous cursor or non-cursor operation.
    Configuring a Berkeley DB Transactional Data Store application is more complicated. The recommended algorithm for selecting the maximum number of locks, lockers, and lock objects is to run the application under stressful conditions and then review the lock system's statistics to determine the maximum number of locks, lockers, and lock objects that were used. Then, double these values for safety. However, in some large applications, finer granularity of control is necessary in order to minimize the size of the Lock subsystem.
    The maximum number of lockers can be estimated as follows:
    * If the database environment is using transactions, the maximum number of lockers can be estimated by adding the number of simultaneously active non-transactional cursors open database handles to the number of simultaneously active transactions and child transactions (where a child transaction is active until it commits or aborts, not until its parent commits or aborts).
    * If the database environment is not using transactions, the maximum number of lockers can be estimated by adding the number of simultaneously active non-transactional cursors and open database handles to the number of simultaneous non-cursor operations.
    The maximum number of lock objects needed for a single database operation can be estimated as follows:
    * For Btree and Recno access methods, you will need one lock object per level of the database tree, at a minimum. (Unless keys are quite large with respect to the page size, neither Recno nor Btree database trees should ever be deeper than five levels.) Then, you will need one lock object for each leaf page of the database tree that will be simultaneously accessed.
    * For the Queue access method, you will need one lock object per record that is simultaneously accessed. To this, add one lock object per page that will be simultaneously accessed. (Because the Queue access method uses fixed-length records and the database page size is known, it is possible to calculate the number of pages -- and, therefore, the lock objects -- required.) Deleted records skipped by a DB_NEXT or DB_PREV operation do not require a separate lock object. Further, if your application is using transactions, no database operation will ever use more than three lock objects at any time.
    * For the Hash access method, you only need a single lock object.
    For all access methods, you should then add an additional lock object per database for the database's metadata page.
    Note that transactions accumulate locks over the transaction lifetime, and the lock objects required by a single transaction is the total lock objects required by all of the database operations in the transaction. However, a database page (or record, in the case of the Queue access method), that is accessed multiple times within a transaction only requires a single lock object for the entire transaction.
    The maximum number of locks required by an application cannot be easily estimated. It is possible to calculate a maximum number of locks by multiplying the maximum number of lockers, times the maximum number of lock objects, times two (two for the two possible lock modes for each object, read and write). However, this is a pessimal value, and real applications are unlikely to actually need that many locks. Reviewing the Lock subsystem statistics is the best way to determine this value.
    I created DB_CONFIG file, and add three lines:
    set_lk_max_locks 20000
    set_lk_max_lockers 20000
    set_lk_max_objects 20000
    As the default values are 1000 of each type of object, my applicaton open 499 database(except internal database) simultaneously(CDB modal) . After changed parameters, my application opend above 6000 database.

  • How far will the extreme reach and how many users can be on there at the same time?

    How far will the airport extreme reach and how many users can be on there at the same time?

    Last question first, since that is the easy one......approximately 50 (fifty) users for wireless depending on how active each user might be.
    The first question is much more difficult, as distance is not really the issue with wireless.....obstructions are the issue.
    A wireless signal can easily travel 300 feet or more with no obstructions in the signal path.
    But, a typical wall of sheetrock or wallboard in a home will absorb....on average....15-20% of the wireless signal. Brick or adobe will obviously absorb much more. A ceiling....because it is thicker....will absorb about 25-35% of the signal.
    So, if the wireless signal must pass through several walls and a ceiling, there won't be much, if any, of the signal left....even though the distance that the signal travels is not great...for example, 20-25 feet.
    Other wireless networks around you at the neighbors can also affect the relative strength of the wireless signal.
    The bottom line....locate the AirPort Extreme where wireless devices will receive a signal with the least amount of obstructions in the signal path. Your actual performance cannot be predicted in advance. You will not know how well the AirPort Extreme works for you until you try it out in your home.
    If you find that the signal does not reach as far as needed,  you will need to add additional "extenders", like an AirPort Express to provide more signal coverage.

  • How many notes can you store in notes application?

    how many notes can you store in notes application?

    chanrachu wrote:
    ready store back factory setting all my data loss but insert sim start reboot
    I have no idea what that means or how it is related to the question about how many notes you can store in the Notes application. If your question is not related to the OP's question, it's both more polite and more effective to start your own thread with a properly descriptive subject line. If English is not your native language, you might do better posting in your native language. If that's not an option, please try to write your post in complete sentences with punctuation. Give as much detail as you can, including what you're trying to do, what happens when you try, what error messages your getting and what troubleshooting steps you've already taken.
    Best of luck.

  • How many look and fields in java ?

    How many look and fields in java ?

    lol, theres 4 i believe, that come standard with java. Only problem is, you can't use them all. The Windows one can only be used on windows, the mac on mac. Metal is the default, and theres Motif. So technically, depending on your OS, thers 2 or 3. You can also download Look and Feels, theres tons out there, most want you to pay however. You can also write your own.

  • How many users can connect to a shared drive on a non-server workstation?

    How many users can connect to a shared drive on a non-server workstation? We're waiting for our server to arrive and in the interum we're using a Pegasus 2 R6 attached to an iMac running Mavericks as our fileserver. It's been sketchy, the connection to the server being dropped once in a while or the inability to mount the drive after a week of success. The Pegasus we're using now will be attached to a server once it arrives. For now I need to figure what's coausing trouble before I commit to this being our main storage as planned. The data is backed up every night so I'm not worried, its the usability issues. 5-7 people are mounting this drive and opening/saving at the same time. Is there a limit to Maverick's fileserving ability that may be causing this? Understandable if so.

    The file server in the client version of OS X has a default limit of 10 simultaneous connections. That limit can be raised by installing OS X Server, or lowered by setting a hidden preference. Assuming you've done neither, you may be able to solve the problem temporarily by stopping and restarting file sharing in the Sharing preference pane, or permanently by setting another hidden preference on the server to break idle connections quickly.
    defaults write /Library/Preferences/com.apple.AppleFileServer idleDisconnectOnOff -bool YES
    Stop and restart file sharing. To reverse the change, run this command in the same way:
    defaults write /Library/Preferences/com.apple.AppleFileServer idleDisconnectOnOff -bool NO
    Credit for this solution to ASC member suter:
    this file server will not allow any additional users to log on

  • How many tasks can I have in NI-DAQmx system?

    I am working out of the office this week - please send your response to [email protected] as well as my normal email [email protected].
    I am designing a new test platform that will run on C# (because we like object oriented text based programming and because the IDE is free).  For hardware we'll use your PXI modules (because your hardware is ultra-reliable).  I'm starting with the following PXI modules 6259, 4072, 6509, 2575, and 2569, but we made add other modules later as future requirements demand.  I am doing the system software architecture now.  I've done some dabbling with Ni_daqmx, and I loathe "tasks" and "channels", but am determined to make them work.
    The difficulty I'm having revolves around the overhead with setting up tasks and channels and with the concept of tasks and channels.  Help hasn't helped much.  Tasks seem to work great if you intend to always collect the same large amount of data from many sources and always will do it in exactly the same way. 
    We want something much more akin to random access memory.  We'll have UUTs of different kinds coming on and off at random times.  Sometimes a test will need a simple DC voltage, and other times another test will need 2 seconds worth of data at 1MS/s.   It can cost around 150msec to make that change (stop the current task, creat another one, configure anohter channel, start up a new task, blah, blah, task this, channle that - for the life of me I can't understand what this damn taks concept does for me but make matters more complicated and bog down my system).
    I can just barely glean from the help that I can have only one analog input task at once, but I can have sevferal taks of several different kinds running at the same time ( a digital output task and another task for digital input, and another task for analong input, etc.) .  It does seem that I can set realys without having to put them into a channel and a task (Thank goodness for that - I just wanna turn on a relay I have no idea what a relay "channel" might be.)
    In the PXI system I described above I'll have two devices that are analog input devices, the DMM and the Daq.  Even with two devices, can I only have one analog input task running?  Does that mean I've got to waste 150msec just to switch from the DMM to the Daq? (Do you understand my frustration with "tasks"? - I should be able to say "read DMM" and turn around and say "read Daq channel 0" without having to jump thru task and channle hoops and waste a bunch of time doing it).
    I'll also have Daq digital IO and two 6509 digital io modules.  Do I have to cram all of that into some "task" concept too?  The Daq card has got many other kinds of wonderful capability (frequency measurement, counters, analog output).  How many tasks can I have for that stuff?  On the DMM card I can measure capacitance amoung other things.  Will I have a capacitance task?  The idea of a "capacitance task" hurts my head.
    Golly I hate tasks.  Please help.
    I am working out of the office this week - please send your response to [email protected] as well as my normal email [email protected].
    Dave

    Dave,
    Thanks for posting to the NI Forums.
    For the good of the community we like to keep conversations that start of the forums on the forums rather than moving to email.  If you want to move to email support I recommend contacting NI through the email route.
    I will answer your questions here.  If you need more direct contact please feel free to contact us through [email protected].
    For some the concept of tasks may seem daunting, however, for many applications it makes life a lot more simple.  A task at a very fundamental level is simply a collection of channels with a single type (AI, DI, DO, etc.)  and a single timing configuration (sampling rate, continuous vs. finite, etc.).  It is a way to organize configuration data.  
    The concept of a task is an abstraction like OO programming.  Like OO programming it may take some time to understand but can be a time saver in the end.  Also like OO programming it does add some initial programming overhead.  It is much more simple to simply type a printf statement in C than to have to create a bunch of classes just to output text to the screen. You can accomplish the same thing not using OO programming, but in the end OO programming is extremely useful, because it groups useful information and methods together in one place.
    With very simple applications OO programming sometimes does not make sense.  But as a program gets more and more complex OO programming becomes more and more useful.  It takes some learning but it is worth it.
    I believe the concept of a task does the same thing.  It does not change the actual functionality of the device or add excessive overhead.  It is just an abstraction that pulls configuration data about a specific "task" and methods the task can perform into a single logical place.
    Unlike the entirely abstract concept of an Object, a Task is run on a physical device and therefore has physical limitations.  You can create multiple tasks of the same type, but you can only run a one timed task of each type on a single board at a time.  In other words you can have multiple AI tasks running at the same time but they need to run on different boards or only one can be timed (have a rate).  You can also have multiple timed AI tasks configured for a single board but only one can actually be running at a time.
    The reason you can only have a single timed task running at a time is because the M-Series boards (and many other boards as well) have a single timing engine for each type of acquisition or generation.  There is a single timing engine for AI, one for AO, and so forth.  You cannot have channel 1 running at 1 MS/s and another running at 50 kS/s.
    However, tasks can exist even when they are not being actively run.  You can create all the tasks you need at the beginning of your program and simply start and stop them as you need.  After the task is stopped you do not need to clear the task until the end of your program.  You can further increase performance by moving the Task into the latest state possible without actually starting the task.  This can be done by calling myTask.Control(TaskAction.Action).  The Task states are further explained in the NI-DAQmx Help Manual.
    The concept of a  task will need to be used with any device that is being programmed using NI-DAQmx.  The 6259 and 6509 will need to be programmed using DAQmx.  With the 2575 and 2569 you have the choice of either using the NI-DAQmx API or the NI-SWITCH API.  The SWITCH API does not use the concept of tasks.  For the 4072 you will need to use the NI-DMM API.  This API also does not use the concept of tasks.
    Hopefully this information is helpful.  Let me know if you have any additional questions or concerns.
    Regards,
    Neil S.
    Applications Engineer
    National Instruments

Maybe you are looking for