Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Hey

  1. #1
    Junior Member
    Join Date
    Feb 2014
    Thanked 0 Times in 0 Posts

    Default Hey

    could somebody help me please with this code. I do not know anything about Java.

    * @param args
    public static void main(String[] args) {
    float ans;

    System.out.println("Enter num");
    num = input.next float();{

    System.out.println("Enter choice");
    choice = input.next Int();
    if(choice == 1);
    ans = num * num;
    System.out.println("The square of number is + ans");
    Thank you
    Last edited by Tiger32; February 28th, 2014 at 11:00 PM.

  2. #2
    Super Moderator
    Join Date
    Jun 2013
    So. Maryland, USA
    My Mood
    Thanked 698 Times in 680 Posts

    Default Re: Hey

    Welcome to the Forum! Please read this topic to learn how to post code correctly and other useful tips for newcomers.

    Don't be shy about posting a topic in the forums (probably, "What's Wrong With My Code") and asking for help there. You won't get much help until you've made some effort, so correctly post the code you've tried with any errors you don't know how to fix, and ask specific questions about what you need help with. If you for some odd reason can't write even the simplest code to start your assignment, write some pseudocode or a class with comments that describe what you'd like to do and post that.

Similar Threads

  1. Hey!
    By Oldemor in forum Member Introductions
    Replies: 1
    Last Post: September 18th, 2013, 02:23 PM
  2. Hey all!
    By Violescent in forum Member Introductions
    Replies: 1
    Last Post: January 23rd, 2013, 04:18 PM
  3. Hey
    By kenamine in forum Member Introductions
    Replies: 1
    Last Post: October 5th, 2012, 02:57 AM
  4. hey
    By grandmst in forum Member Introductions
    Replies: 2
    Last Post: November 14th, 2011, 08:16 AM
  5. Hey Everyone!
    By ChrisMessersmith in forum Java Theory & Questions
    Replies: 2
    Last Post: November 12th, 2011, 09:31 PM