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.


>> REGISTER NOW TO START POSTING


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

Results 1 to 2 of 2

Thread: Java Problem

  1. #1
    Junior Member
    Join Date
    Oct 2019
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Java Problem

    Anyone willing to help me with this?

    Part A:

    Write an application whose main() method holds two integer variables. Assign values to the variables. In turn, pass each value to methods named displayTwiceTheNumber(), displayNumberPlusFive(), and displayNumberSquared(). Create each method to perform the task its name implies (for example, displayTwiceTheNumber given the value 10 should display the following:

    10 times 2 is 20

    Part B:

    Modify the NumbersDemo class to accept the values of the two integers from a user at the keyboard. Output the answers to the console.

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Java Problem

    What have you tried?
    Do you have any specific java programming questions?
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Java 7 or java 8 problem syntax
    By glprobot in forum Java Theory & Questions
    Replies: 0
    Last Post: August 26th, 2019, 03:24 AM
  2. Java problem
    By destinedtale in forum What's Wrong With My Code?
    Replies: 7
    Last Post: July 7th, 2014, 11:02 AM
  3. [SOLVED] java SQL problem
    By Slapy in forum What's Wrong With My Code?
    Replies: 2
    Last Post: March 22nd, 2014, 05:01 PM
  4. HELP,java problem *java.lang.NullPointerException*
    By Agung_Rianto in forum What's Wrong With My Code?
    Replies: 4
    Last Post: February 24th, 2014, 11:19 AM
  5. java problem. please help
    By jimmy_crews in forum What's Wrong With My Code?
    Replies: 2
    Last Post: July 31st, 2013, 10:33 AM

Tags for this Thread