New to Java and already have difficulties

Alright, I'm running under NetBeans IDE 4.0. I'm taking it through the quick start guide and am now having problems. I am down to the LibClass.java and Main.java. LibClass.java is done without problems that I can see. Main.java is telling me theres a problem in one of my lines.
The Guide asked me to type in "String result = Li" and then hit "ctrl + space" to bring up code completion and look for LibClass which I cannot find, so I chose to finish the code myself and just typed "String result = LibClass and went on, but its telling me that the line is incorrect. Could anyone help me figure out why its telling me this?

You know what? Don't touch Netbeans. Delete it and
get UltraEdit or Textpad or whatever. And then read
these and the following tutorials:
http://java.sun.com/docs/books/tutorial/getStarted/cup
ojava/index.htmlWhat Ceci is suggesting is that you are trying to learn the java language, but by using NetBeans (or any other IDE), you are facing two learning curves .... one for Java, and one for the IDE. This can be very confusing. Instead, use any text editor you are comfortable with, and compile using the command line compiler (javac). The tutorial for your operating system (most likely windows) will help you get started. That way, you are only struggling with learning Java.
Rene, I hope I have interpreted your post into noobSpeak acceptably.
� {�                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • HT1178 i am setting u a new time capsule. i already have a wifi setup in my office. now i want to use this time capsule just as a wireless backup machine. do i still need to attached a DSL cable, or it can connect to my existing wifi and start working ?

    i am setting u a new time capsule. i already have a wifi setup in my office. now i want to use this time capsule just as a wireless backup machine. do i still need to attached a DSL cable, or it can connect to my existing wifi and start working ?

    You probably can, but this type of configuration is not recommended or supported by Apple.
    Two cautions if you want to try this:
    1)  The Time Capsule has to be configured to "Join" your existing wireless network in this type of setup...and to do that, you must know the exact type of wireless security that your network is using.
    2)  Backups are likely going to take twice as long. The wireless signal must travel from your computer to the wireless router and then from the wireless router back to the Time Capsule.  Two "hops"......even if the computer is located close to the Time Capsule.
    If you want to try this, we can tell you how....but with no guarantees on your results....since this is not officially supported.

  • I'm setting up my new iPhone and already have an iTunes account.  It's asking me if I would like to set up as a new iPhone, or Restore from the backup of my iTouch.  If i set up as a new iPhone will that delete all my music from my previous iTunes account

    I'm setting up my new iPhone and already have an iTunes account.  It's asking me if I would like to set up as a new iPhone, or Restore from the backup of my iTouch.  If i set up as a new iPhone will that delete all my music from my previous iTunes account?

    It will not do anything at all to your computer.

  • How can I download photoshop extended on my new iMac? I already have it downloaded and am using it on the old iMac

    Please, how can I download photoshop extended on my new iMac? I already have it downloaded and am using it on the old iMac

    if you follow all 7 steps, you can download a trial via one of the links on this page using a browser that accepts cookies:  http://prodesigntools.com/photoshop-elements-10-direct-download-links-pse-premiere-pre.htm l
    and activate with your serial number.
    if you have a download problem, you didn't follow all 7 steps.  typically, failure to meticulously follow steps 1,2 and/or 3 is the problem, but your browser must also allow cookies so that's (a restrictive browser setting) another potential source of problems.

  • Got error message this Ipod cannot be used because the required software is not installed. Run the Itunes installer to remove Itunes and install the 64-bit version and already have latest version and 64

    Got error message :"This this Ipod cannot be used because the required software is not installed. Run the Itunes installer to remove Itunes and install the 64-bit version"   This is on a new macbook.  I already have the latest version installed and 64 bit.  Help.

    Did you do what the message said?
    Also try using the Win 7/Vista link in the following:
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP

  • Im new to java and hope somebody can help me with my question

    Hi!
    Im quite new to java and I just have some simple questions..
    can someone please tell what kinds of error are considered as language violation for java? where can I find more info about these errors?
    can someone give me a simple example on a kind of error that cannot be caught in both compilation and runtime? I hope someone can help me out. Thanks in advance!!

    knightz211 wrote:
    Im just asking about errors that might go against the language definition but cant be detected.. If it "goes against the language defintion," it will be detected by the compiler. That's half of the compiler's job is to tell you what you've done that violates the language spec.
    because it confuses me when they say that such errors might occur so I just want to know what might these errors be.. sorry for that..Who's "they"? What exactly* did "they" say about "such errors"? It sounds to me like you're just confused, and you think there's something mysterious and inexplicable going on but you don't know what and don't even know what you're asking.
    I would suggest not worrying about hypothetical problems that you can't even put into words and focussing on learning Java. Along the way, if you encounter real, specific, actual problems, ask about them, and you'll probably get answers about the problems themselves and the language or theory behind them.

  • My itunes won't work on my mac. When I try to download all my songs to my iPad it says I need to get the new version when I already have it already

    When I try to download all my songs to my iPad it says I need to get the new version when I already have it already

    Are you sure you have the newest version of iTunes 11 and newest version of iOS6? Go to Software Update and make sure you do.

  • Hello, I am new to java and I am trying to something cool

    Hello I am new to Java and I am trying to do something cool. I have written some code and it compiles nicely. Basically what I am trying to do is use ActionListeners with JTextArea to change the size of a rectangle thing.
    Here is my code. The problem is that when I push the submit button nothing happens. Any help you could give would be greatly appreciated.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import javax.swing.*;
    class SecondGate extends JFrame implements ActionListener {
         float sxd = 190f;
         float dps = 190f;
         JTextArea Long = new JTextArea(1,3);
         JTextArea Short = new JTextArea(1,3);
         JLabel one = new JLabel("width");
         JLabel two = new JLabel ("Height");
         JButton Submit = new JButton("Submit");
    public SecondGate() {
    super("Draw a Square");
    setSize(500, 500);
         Submit.addActionListener(this);
         setLayout(new BorderLayout());
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         String Width = Float.toString(sxd);
         String Height = Float.toString(dps);
         Rect sf = new Rect(Width, Height);
         JPanel pane = new JPanel();
         pane.add(one);
         pane.add(Long);
         pane.add(two);
         pane.add(Short);
         pane.add(Submit);
         add(pane, BorderLayout.EAST);
         add(sf,BorderLayout.CENTER);
    setVisible(true);
         public void actionPerformed(ActionEvent evt) {
    Object source = evt.getSource();
    if (source == Submit) {
              sxd = Float.parseFloat(Long.getText());
              dps = Float.parseFloat(Short.getText());
         repaint();
         public static void main(String[] arguments) {
    SecondGate frame = new SecondGate();
    class Rect extends JPanel {
         String Width;
         String Height;
    public Rect(String Width, String Height) {
    super();
    this.Width = Width;
    this.Height = Height;
    public void paintComponent(Graphics comp) {
    super.paintComponent(comp);
    Graphics2D comp2D = (Graphics2D)comp;
    comp2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
         BasicStroke pen = new BasicStroke(5F, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND);
    comp2D.setStroke(pen);
         comp2D.setColor(Color.blue);
         BasicStroke pen2 = new BasicStroke();
    comp2D.setStroke(pen2);
    Ellipse2D.Float e1 = new Ellipse2D.Float(235, 140, Float.valueOf(Width), Float.valueOf(Height));
    comp2D.fill(e1);
         GeneralPath fl = new GeneralPath();
         fl.moveTo(100F, 90F);
         fl.lineTo((Float.valueOf(Width) + 100F),90F);
         fl.lineTo((Float.valueOf(Width) + 100F),(Float.valueOf(Height) + 90F));
         fl.lineTo(100F,(Float.valueOf(Height) + 90F));
         fl.closePath();
         comp2D.fill(fl);
         }

    I got it to work. You were right about the method and references. Thank you
    Here is the working code for anyone who is interested in how to do this.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import javax.swing.*;
    class SecondGate extends JFrame implements ActionListener {
    float sxd = 190f;
    float dps = 190f;
    JTextArea Long = new JTextArea(1,3);
    JTextArea Short = new JTextArea(1,3);
    JLabel one = new JLabel("width");
    JLabel two = new JLabel ("Height");
    JButton Submit = new JButton("Submit");
    String Width = Float.toString(sxd);
    String Height = Float.toString(dps);
    Rect sf = new Rect(Width, Height);
         public SecondGate() {
              super("Draw a Square");
              setSize(500, 500);
              Submit.addActionListener(this);
              setLayout(new BorderLayout());
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              JPanel pane = new JPanel();
              pane.add(one);
              pane.add(Long);
              pane.add(two);
              pane.add(Short);
              pane.add(Submit);
              add(pane, BorderLayout.EAST);
              add(sf,BorderLayout.CENTER);
              setVisible(true);
         public void actionPerformed(ActionEvent evt) {
              Object source = evt.getSource();
              if (source == Submit) {
              String Width = Long.getText();
              String Height = Short.getText();          
              sf.Width(Width);
              sf.Height(Height);
                   repaint();
         public static void main(String[] arguments) {
              SecondGate frame = new SecondGate();
         class Rect extends JPanel {
              String Width;
              String Height;
         public Rect(String Width, String Height) {
              super();
              this.Width = Width;
              this.Height = Height;
         String Width (String Width){
              this.Width = Width;
              return this.Width;
         String Height (String Height) {
              this.Height = Height;
              return Height;
         public void paintComponent(Graphics comp) {
              super.paintComponent(comp);
              Graphics2D comp2D = (Graphics2D)comp;
              comp2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
              BasicStroke pen = new BasicStroke(5F, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND);
              comp2D.setStroke(pen);
              comp2D.setColor(Color.blue);
              BasicStroke pen2 = new BasicStroke();
              comp2D.setStroke(pen2);
              Ellipse2D.Float e1 = new Ellipse2D.Float(235, 140, Float.valueOf(Width), Float.valueOf(Height));
              comp2D.fill(e1);
              GeneralPath fl = new GeneralPath();
              fl.moveTo(100F, 90F);
              fl.lineTo((Float.valueOf(Width) + 100F),90F);
              fl.lineTo((Float.valueOf(Width) + 100F),(Float.valueOf(Height) + 90F));
              fl.lineTo(100F,(Float.valueOf(Height) + 90F));
              fl.closePath();
              comp2D.fill(fl);
              }

  • I want to download pictures from my iphone to my new computer.  I already have itunes on my pc. I need to download itunes on my new laptop, will this create issues with my other itunes?

    I want to download pictures from my iphone to my new laptop.  I already have itunes on my pc. I need to download itunes on my new laptop, will this create issues with my other itunes?

    m-cp wrote:
    I want to download pictures from my iphone to my new laptop.
    -> iOS: Importing personal photos and videos from iOS devices to your computer
    I need to download itunes on my new laptop, will this create issues with my other itunes?
    No.

  • I just got a new iPad 2 and I have lot of questions. I was able to wirelessly link my iPad and iTunes on my PC. I was able to SYNC my email and calendar (new only no history), however I have not been able to SYNC Outlook contacts.

    I just got a new iPad 2 and I have lot of questions. I was able to wirelessly link my iPad and iTunes on my PC. I was able to SYNC my email and calendar (new entries only no history), however I have not been able to SYNC Outlook contacts. Outlook has multiple contact lists. Only one has any data. I can't find a way to delete the others and I can't keep the one I want to use at the top of the list. Any ideas?
    I have a question about email. I have several thousand emails in 10 or so days. How can I select multiple emails for deletion in stead of one at a time? How do I designate emails from a given sender as junk or block certain senders?
    Ron

    the spcs page on this site state which video formats the ipad supports
    I'd suggest converting your old videos to one of those formats
    handbrake is a free program which does this for you
    itunes used to be able to too when I right clicked incompatible media but don't see the option any more
    or maybe it only show when one right click incompatible media and currently my lib don't have any
    about the music then it's odd what formats are they?
    if they are acc protected have you tried to remove the DRM this can be don using itunes as
    apple don't use DRM for music any more

  • I use to have a iTunes account with my old computer, and I have lost all my iTunes music, some purchased, some downloaded from another source. Now I'm using a brand new computer (Windows) and I have opened a NEW iTunes account, but I need my music back...

    I use to have a iTunes account with my old computer, and I have lost all my iTunes music, some purchased, some downloaded from another source. Now I'm using a brand new computer (Windows) and I have opened a NEW iTunes account, but I now I need to figure out if it is possible to recoup my music content that I originally had. I had, I believe around close to 300 songs on my account ;(......Any help or guidance would be greatly appreciated.
    Thanks Again, Ronald
    <Email Edited By Host>

    ronaldkerr24 wrote:
    Now I'm using a brand new computer (Windows) and I have opened a NEW iTunes account
    Now remove all your info and update the old AppleiD/iTunes account and use only that account.
    You cannot transfer items between iTunes accounts.
    You can redownload all the content.

  • I'm new to Mac and I have a Mac Mini. Could you please tell me how I could paste an URL to a video downloader like "Coolmuster Video Downloader for Mac"? I can copy the url but I could not paste it on the downloader. I appreciate your help to my problem.

    I'm new to Mac and I have a Mac Mini. Could you please tell me how I could paste an URL to a video downloader like "Coolmuster Video Downloader for Mac"? I can copy the url but I could not paste it on the downloader. I appreciate your help to my problem.

    Is this happing because the external is formatted to PC and not mac?
    Yes that is correct.
    Will I need to get a mac external hard drive if I wish to continue to save my documents like this?
    If you no longer use a PC you could format this drive for the Mac. However be aware that formatting a drive will erase all the data on it. So you would need someplace to copy the data off this drive to while you did the re-format and then you could copy the data back.
    You could get another drive, format it for the Mac and copy the data to it. Then re-format the original drive and use it as a backup drive. Always good to have backups.
    Post back with the drive type and size of the current drive, if you are doing backups now and how and if you still need to access this drive from a PC.
    regards

  • HT1212 I just got a new IPad mini and must have entered in a 4 digit password when setting up but I can't remember it.  I can't get on the IPad.  Any suggestions?

    I just got a new IPad mini and must have entered in a 4 digit passord.  I can't remember what it is, so I can't get on the IPad.  I had not connected it to Itunes yet.
    Any suggestions?

    How can I unlock my iPad if I forgot the passcode?
    http://www.everymac.com/systems/apple/ipad/ipad-troubleshooting-repair-faq/ipad- how-to-unlock-open-forgot-code-passcode-password-login.html
    iOS: Device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    How can I unlock my iPad if I forgot the passcode?
    http://tinyurl.com/7ndy8tb
    How to Reset a Forgotten Password for an iOS Device
    http://www.wikihow.com/Reset-a-Forgotten-Password-for-an-iOS-Device
    Using iPhone/iPad Recovery Mode
    http://ipod.about.com/od/iphonetroubleshooting/a/Iphone-Recovery-Mode.htm
    You may have to do this several times.
    Saw this solution on another post about an iPad in a school environment. Might work on your iPad so you won't lose everything.
    ~~~~~~~~~~~~~
    ‘iPad is disabled’ fix without resetting using iTunes
    Today I met my match with an iPad that had a passcode entered too many times, resulting in it displaying the message ‘iPad is disabled – Connect to iTunes’. This was a student iPad and since they use Notability for most of their work there was a chance that her files were not all backed up to the cloud. I really wanted to just re-activate the iPad instead of totally resetting it back to our default image.
    I reached out to my PLN on Twitter and had some help from a few people through retweets and a couple of clarification tweets. I love that so many are willing to help out so quickly. Through this I also learned that I look like Lt. Riker from Star Trek (thanks @FillineMachine).
    Through some trial and error (and a little sheer luck), I was able to reactivate the iPad without loosing any data. Note, this will only work on the computer it last synced with. Here’s how:
    1. Configurator is useless in reactivating a locked iPad. You will only be able to completely reformat the iPad using Configurator. If that’s ok with you, go for it – otherwise don’t waste your time trying to figure it out.
    2. Open iTunes with the iPad disconnected.
    3. Connect the iPad to the computer and wait for it to show up in the devices section in iTunes.
    4. Click on the iPad name when it appears and you will be given the option to restore a backup or setup as a new iPad (since it is locked).
    5. Click ‘Setup as new iPad’ and then click restore.
    6. The iPad will start backing up before it does the full restore and sync. CANCEL THE BACKUP IMMEDIATELY. You do this by clicking the small x in the status window in iTunes.
    7. When the backup cancels, it immediately starts syncing – cancel this as well using the same small x in the iTunes status window.
    8. The first stage in the restore process unlocks the iPad, you are basically just cancelling out the restore process as soon as it reactivates the iPad.
    If done correctly, you will experience no data loss and the result will be a reactivated iPad. I have now tried this with about 5 iPads that were locked identically by students and each time it worked like a charm.
    ~~~~~~~~~~~~~
    Try it and good luck. You have nothing more to lose if it doesn't work for you.
     Cheers, Tom

  • Hi. Does anyone know what video editing software is compatible with my MacBook - version 10.6.3? I am looking to edit films and already have Final Cut Pro, but am looking for something a little more basic and easier to use. Thanks. Vicki

    Hi. Does anyone know what video editing software is compatible with my MacBook - version 10.6.3? I am looking to edit films and already have Final Cut Pro, but am looking for something a little more basic and easier to use. Thanks. Vicki

    Hi Cereskit
    Thanks again for the message. I've done the updates and have the App Store on my desktop. I went into it and searched for imovie but couldn't find the basic imovie, which I presume is what I'd need for editing?, rather than imovie 11 for £10.49, which is for making trailers, it seems. Also, were you saying that imovie would be free?
    Vicki

  • I am new to iOS and just have basics understanding regarding App Development. I would like to work on IRKIT. Any Beginner Guide or reference regarding IRKIT ?

    I am new to iOS and just have basics understanding regarding App Development. I would like to work on IRKIT. Any Beginner Guide or reference regarding IRKIT ?

    Restore from iTune Backup
    1. Settings>General>Reset>Erase all content and settings
    2. You will be asked twice if you want to erase iPad
    3. Slide to set up
    4. Select Language
    5. Select Country
    6. (a) Use Location Service   (b) Don't use Location Service
    7. Choose Wi-Fi Network
    8. Enter Wi-Fi password
    9. (a) Setup as new (b) Restore from iCloud Backup (c) Restore from iTune Backup
    10. Select "Restore from iTune Backup"
    11. You will be instructed to connect to iTune (computer)
    On computer
    12. Two options offered
    13. (a) Set up as new iPad (b) Restore from backup (a list of backup will be shown)
    14. Select Restore from backup and select the backup
    15. Continue
    16. Restoring iPad from backup
    17. The settings for iPad restored

Maybe you are looking for