New to programming, having trouble with xcode

Discussion in 'Mac Programming' started by kevinlyman7, Jul 26, 2010.

  1. kevinlyman7 macrumors newbie

    Jul 26, 2010
    I just started my first programming class and we use jgrasp in class so i'm used to the very basics. here is my code, it's in java, please spare me any opinions about c++ or anything. We are starting our class with java, and i need to practice but i'm not sure how to work xcode.

    // Tryagain
    // Created by Kevin Lyman on 7/27/10.
    // Copyright 2010 fatkids_inc. All rights reserved.

    public class pleasework {
    public static void main(String args[]) {

    System.out.println ("Hello Kevin.");



    when i run the program it asks me if i'd like to stop the executable "tryagain" i click ok and then i get a text box that pops up that says "java application" in it where i presume the words "hello Kevin" should be. What am i doing wrong, i just want to compile and run code to practice for class and do home work.
  2. Cromulent macrumors 603


    Oct 2, 2006
    The Land of Hope and Glory
    I'd stick to something like Netbeans or Eclipse really for Java. You can use Xcode for it but the later versions have made it quite tough (you need to create your projects through the Xcode Organiser).
  3. Ap0ks macrumors 6502

    Aug 12, 2008
    Cambridge, UK
    Do you have the console open when you run the application?

    You should see your text in the console rather than in a pop-up window.
  4. winninganthem macrumors 6502a


    Jun 10, 2008
    Not sure, but will it even compile with the class name all lowercase? Use "public class Pleasework" and not "public class pleasework".
  5. macsmurf macrumors 65816


    Aug 3, 2007
    Yes it will, although it is bad form. Java is case sensitive but attaches no special meaning to camel case. It's convention (and should be followed, unless you have a good reason not to (you don't)).

Share This Page