VERY basic question but I haven't found a good example...

I've been trying to figure out how to make one big project using class files to break the big project down into several small projects. I can't seem to find a good explanation of how to make one class file recognize another.
Hell, I'll even throw in a Duke Dollar because I know this should be totally obvious to me...

Hi. Well yes this is quite simple, but we all have our problems :) Breaking down a program into classes is very good for security reasons and productivity. All that you should do is take all of your MAJOR "methods" and place them in a class file by itself :
public class MyMethods
(your methods)
Then in your MAIN class you just use those class files as objects :
public class MyMainClass extends MyMethods
public static void main(String args[])
MyMethods.MyMethod();
and just keep doing that. Normally in java you have a main class file like the one i just showed u and one or several other class files that contain all of your methods that makes your program run. You just use your class files as objects which is a big thing that Java is about, "object oriented programming", but of course u must extend the class, as I showed. Extending makes everything that you have in that class file , "come" into that file.
Hope that helps, I need that 1 duke dollar :)
-Later

Similar Messages

  • Possibly a very basic question but I have set up a spread sheet in Numbers and have viewed help videos but I can't get it to give me sums for the columns I highlight.  Keeps coming up with the figure zero.  I have version 09 2.3(554). Can anyone help

    Possibly a very basic question but I am going nowhere without a solution.  I have set up a spreadsheet in Numbers but it won't give me sums for chosen columns. I  have viewed the run through videos and used the formula but nothing happens apart from giving a figure of zero or a red arrow.  The sum icon in the bottom left hand section of the window does not highlight or show any total as I understand from the video that you can drag whatever total is here onto the relevent position on your spreadsheet.  I have Numbers 09 version 2.3 (554). Can anyone advise. Thanks.

    Hi Sohojools,
    To sum a column, use a formula such as this one in Cell A6
    Type this in a cell below your data:
    =SUM(A2:A4) or whatever range of cells you want to sum. The easy way is to type:
    =SUM(
    and then drag or shift-click to select the range of cells. Close the formula with a final bracket ")".
    The sum icon in the bottom left hand section of the window does not highlight or show any total
    To see the sum (and other simple statistics) in the bottom left, select a range of cells. That tells Numbers which cells you are refering to.
    The videos are good, but the Numbers'09 User guide, and the Formulas and Functions User Guide are better. Download them from the Help Menu in Numbers.
    Regards,
    Ian.

  • If I upgrade to Mountain Lion on the computer that will install it, will my WIFI still work on the computer that cannot be upgraded? I know this is a very basic question

    If I upgrade to Mountain Lion on the computer that will install it, will my WIFI still work on the computer that cannot be upgraded? I know this is a very basic question. Trying to hold out as long as I can, but purchasing an iPhone for Christmas and new iMac next year when warrently expires.

    Thank U very much for the quick reply, I wanted to upgrade this weekend, but still on the fence. I can live with the software that is not compatible, they are on another compuetr, just didn't want the obvious stuff to stop working.

  • A very basic question regarding data block

    Hi All,
    I've a very basic question concerning data blocks in oracle forms 10g.
    I want to make a view only screen (only query allowed, no update, insert or delete).
    I'll have 6-7 fields on the screen but all the fields are not from a single table.
    For e.g, let say we've field names to display on the screen are f1, f2, f3, f4..
    Out of this f1 and f2 will come from table A and f3, f4 will come from table B.
    Now, my question : Is it possible to create a data block using the data block wizard for such situation if we select create data block from table options?
    If no, can you please tell me an approach to do this.
    Regards,
    Navnit

    Hello ,
    First write your query & select datablock property.
    just change the below properties
    Query Data Source Type=From Clause Query
    Query Data Source Name = (Paste query here)
    now you should add the block ITEMs and give their names according to query columns names. shows the column on canvas and run..
    Best Regard
    skyniazi
    Edited by: SKYNIAZI on Mar 29, 2009 1:32 PM

  • Here's a very basic question about 2 TB external drives and Time Machine.

    Here's a very basic question about 2 TB external drives and Time Machine.
    Ihave a Mac Pro with a .75 TB and 1 TB drive.  It also has a 1 TB 2ndinternal drive.  My current external drive is too small so I'll begetting a 1.5 TB or 2 TB drive.
    Obviouslythe new larger 2 TB drive will backup everything on the Mac Prointernal drive with Time Machine.  But there will be 1 TB of space leftover going to waste.
    ShouldI partition the external drive so that the TM portion will be 1 TB andthe use the remaining extra partition for additional file backups withCarbon Copy?
    Thanks for any insights.
    I tried searching around on the new Apple discussion forum, but I find it much harder to use than the old forum I used to use.

    The problem with terabyte drives is that that a 3 TB is about as big as you can get without going into RAID territory. Ideally, a Time Machine drive should be 3 times as large as all the drives you are backing up. So, if you have 2.75 TB of internal storage, you should have 8 TB of Time Machine space.
    Of course, that is "should". If your TB drives are mostly empty, then you can get away with something 3 times the size of your used disk space. Just remember that you are pushing it. Linc is right about Time Machine needing space to work.
    It is unlikely that you have regular churn on 2.75 TB of disk. I suggest identifying which drives and folders have the most activity and excluding those drives and directories that don't change much. It would be better to archive the data that doesn't change often and keep it out of Time Machine. Then you may be able to get away with a 2 TB Time Machine drive.

  • Very Basic Question - Resizing Image

    Cannot believe I am having to ask such a basic question, but in order to scan and send documents to a particular database, there are two requirements:
    1) 200 dpi, and
    2) Greyscale
    The greyscale I found quickly enough by going to image adjustments -----> B&W. However, how do I get to 200 dpi and then export? Thanks.
    Scott

    Applying a B&W adjustment doesn't change your output color space to grayscale.
    You should create an export preset for this particular purpose. To do this, go to Aperture -> Presets -> Image Export and make a new preset with correct values for image size and resolution. Use Generic Gray Gamma 2.2 as color profile.

  • Recharging my iPod (3rd gen.) on my 2010 iMac goes extremely slowly (via usb port at the back). This is mainly because recharging stops when my mac goes to sleep. I just can't believe that Apple doesn't have a sollution for this, but I haven't found itth

    Recharging my iPod shuffle (3rd gen.) on my 2009 iMac (OS 10.5.8) goes extremely slowly (via usb port at the back). This is mainly because recharging stops when my mac goes to sleep. I just can't believe that Apple doesn't have a sollution for this, but I haven't found it yet... What's the most efficient way of recharging?

    Purchase a wall charger for it instead. 
    B-rock

  • Very basic questions on text/email

    So I'm now convinced - with the 3.0 OS and the 3GS handset, the iPhone finally does all I want it to do and I'll be buying my first one in a couple of weeks.
    Before I do, though, I have a couple of very basic questions:
    1. Does predictive text only work in the SMS app, or does it work in the apps for email, writing notes, etc?
    2. Can you turn the predictive text off? (I find it wildly irritating, because I know far better what words I want to write than a pesky phone does!)
    3. Having email sent to a mobile is a whole new world for me! Do I need to subscribe to MobileMe at £££ per month, or is there another way of having email from my three accounts forwarded to my mobile?
    Hope someone can help!
    Cheers,

    1. Does predictive text only work in the SMS app, or does it work in the apps for email, writing notes, etc?
    It works with Safari, the Mail client, the Notes app, and with the SMS app.
    2. Can you turn the predictive text off? (I find it wildly irritating, because I know far better what words I want to write than a pesky phone does!)
    Yes.
    3. Having email sent to a mobile is a whole new world for me! Do I need to subscribe to MobileMe at £££ per month, or is there another way of having email from my three accounts forwarded to my mobile?
    You can access any IMAP or POP account with the iPhone's Mail client, and access multiple email accounts. I currently access to email accounts with the iPhone's mail client - my MobileMe account, and a business POP account. You can access all 3 of your email accounts with the iPhone's Mail client.

  • Requests to change the security question but have not yet found an email

    Requests to change the security question but have not yet found an email

    If you aren't receiving the email on your rescue email account (and you've checked the spam folder on the account and tried clicking the reset link again) then you will need to contact iTunes Support / Apple to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699

  • Script Language Translation - Very Common Question, but unable to resolve !

    Hi Gurus,
    I know this is very common question, but I am stuck, unable to get this one resolved.
    Need to translate sap script "TEXT SYMBOLS" from "English" to "French".
    Have maintained language translation text symbol values in table TTDTG.
    But when i login through French language, these are still getting printed in English !!
    Any Pointers to resolve this will be of great help.
    Many Thanks,
    Madan

    hi
    1) Copy the Script into FR language and then change the Corresponding ENGLISH text to FRENCH text.
    2) Pass ur logon langauge   in the OPEN_FORM FM  Import parameters
                                                                                    LANGUAGE = sy-langu.
    so that whatever is ur logon langauge it corresponding Form will be called.
    surya

  • Very basic question... can photoshop overwrite the original file?

    Very basic question... can Photoshop Elements 13 overwrite the original file?

    You will need to check the Photoshop Elements for any particulars about that software.
    For Photoshop, if I make changes and exit saving those changes, yes the original is overwritten.
    Keep backups at all times and don't work off flash external drives. When people tell me their original 500 layer file got corrupted, and they didn't keep copies, I hate to tell them their weeks of work is down the bucket.
    In Photoshop, we use Image > Duplicate to work on a copy if we don't want the original touched, or File > Save as... where we give the file a different name. We save image.psd as image1.psd and image.psd is closed. We then have a copy, "Image1" opened.
    Gene

  • Hello, this might be a basic question, but how do you open QuickTime to record a new webinar? I have a new MacBook Pro with Yosemite and can only get QuickTime to appear in Finder but not actually open to allow me to record something new. Thx.

    Hello, this might be a basic question, but how do you open QuickTime to record a new webinar? I have a new MacBook Pro with Yosemite and can only get QuickTime to appear in Finder but not actually open to allow me to record something new. Thx.

    Hi Winterwilly,
    Welcome to Apple Support Communities. 
    The article linked below answers your question of how to use QuickTime to record something on your MacBook Pro’s screen.
    QuickTime Player 10.x: Record your computer’s screen
    Cheers,
    -Jason

  • Entities not showing Contribution - very basic question

    Hi guys,
    Apologies for this very basic question - I'm very new to Hyperion, with just a weeks training! Anyway I'm building a basic model and have noticed that in the Value dimension my entities are not rolling up to the [Contribution Total]. This means that Entities do not roll up!!
    One suggested issue was that I needed a Sub Consolidate in the Rules, however I've set the attribute "ConsolidationRules" to be = to N. In the documentation this is defined as "N to use the default consolidation and eliminations."
    Wondering is there anything else that is needed to use default consolidations, or do I need to create some Rules??
    Thanks
    G

    Why do you think it is not rolling up? If your Consoldiation Rules are set to 'N' you do not need rules.
    Make sure your accounts are set to IsConsoldiate. Make sure you are viewing a 'Parent.Child' at Contribution Total.

  • Very basic question in forum :)

    I know its kind of a basic question, but struggling to get this right while posting.
    Just wanted to know the steps for linking text to hyperlink during posting of answers..
    can someone elucidate the example :_go here_ should be a hyperlink and the link should point to google.com
    Cheers,
    Manik.

    Girish Sharma wrote:
    Something like this :
    [url http://oracle.com]Oracle
    How to write above ?
    [url http://oracle.com]Oracle[/url][url http://www.google.com]Checking
    working thx.
    Cheers,
    Manik.

  • One very basic question about inheritance

    One very basic question about inheritance.
    Why we need inheritance?
    the benefit of inheritance also achieve by creating instance of base class using it in other class instead of extending the base class.
    Can any one please explain why we are using inheritance instead of creating object of base class????

    SumitThokal wrote:
    One very basic question about inheritance.
    Why we need inheritance?
    the benefit of inheritance also achieve by creating instance of base class using it in other class instead of extending the base class.
    Can any one please explain why we are using inheritance instead of creating object of base class????What did you find out when you looked on Google?
    One example of inheritance comes in the form of a vehicle. Each vehicle has similarities however they differ in their own retrospect. A car is not a bus, a bus is not a truck, and a truck is not a motorbike. If you can define the similarities between these vehicles then you have a class in which you can extend into either of the previous mentioned vehicles. Resulting in a reusable class, dramatically reduces the size of code, creates a single point of definition, increases maintainability, you name it.
    In short there are thousands of benefits from using inheritance, listing the benefits could take a while. A quick Google search should give you a few hundred k if not million links to read.
    Mel

Maybe you are looking for