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 3 of 3

Thread: How do I create these Java programs?

  1. #1
    Junior Member RYANSUPERGENIUS1123's Avatar
    Join Date
    Mar 2011
    Location
    Oakland, California 94609
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How do I create these Java programs?

    I'm just wondering how I can create some of these Java programs. I'm not asking for a purpose of solutions just so I can use it to be famous for something I didn't create myself when it's whoever helps me who actually deserves the credit, or trying to get solutions for homework assignments or anything like that. It's not for homework or for getting me credit for something or anything else that's for cheating or taking advantage. I just am not good at creating Java programs, and I just wanna know how to do certain things, and wanna experiment with them, and I just don't know a thing I can do to create some of these Java programs. Anyways, here's some Java programs I wanna know codes for, just so I can, not just use them, but so I can compare and contrast pieces of the code that corresponds to the output I'm seeking, because that's my type of learning skills. Trial and error never works for me, so please just tell me the codes, and please don't think that I'm just giving excuses. Cuz I'm autistic, and I have some problems learning things by using strategies that most people use. That's all. I'm really good at algebra and geometry, but I'm confused with Java programming language. Anyways, here's the programs I wanna know how to create.

    First, I wanna know how to create a program that asks you to put in an integer (including multi-digit integers), and then reads the integer that u type in, and prints out 3 things at once, each one in a separate line: The most significant digit, the largest digit, and the sum of all digits. Like suppose I type in 158724, it will show this output with 3 rows, the first row saying "Most significant digit: 1", the second row saying "Largest digit: 8", and the last row saying "Sum of digits: 27".

    The next thing I wanna know is how to create a Java program that reads a sequence of positive integers entered one per line, and then it will stop reading if "0" is entered, and the output will be the sum of squares. Like suppose I enter 2, then it will tell me to enter another positive integer, and suppose I enter 7, then it will ask me again to enter another, and suppose I enter 3, then it will ask me to enter another, and suppose I enter 5, then it will ask me to enter another, and suppose I enter 0, then it will stop asking me to enter numbers and then show an output saying "Sum of squares: 87". All I know (from common sense) is that I should use a while loop like "stdin.readLine( )", while the proper condition in order for me to break the while loop must probably be "input integer == 0". But I still don't know where in such code I put those things in, since Java programming language is confusing to me. So I need lots of help please.

    And the last thing I wanna know is how to write a Java program that'll ask me to enter 3 integers, and after I do so, then it will compare the values, and then will show an output that shows the largest and smallest integers. Like suppose I enter 59, 40, and 158, then it'll say "The largest is 158 and the smallest is 40".

    And that's all for now. I really would appreciate the help. Especially helping me by giving the details I'm looking for, after I just promised that I'm not asking for this because I wanna use other peoples' knowledge to make me famous or whatever even though u deserve the credit, or for stuff having to do with homework. Thanks.


  2. #2
    Forum Squatter newbie's Avatar
    Join Date
    Nov 2010
    Location
    North Wales
    Posts
    661
    My Mood
    Stressed
    Thanks
    28
    Thanked 115 Times in 106 Posts
    Blog Entries
    1

    Default Re: How do I create these Java programs?

    Not sure if you're being serious, but If you want to get stuck into Java, you can't come and request code for every little project which you find intriguing.
    I suggest you start reading:
    Trail: Getting Started (The Java™ Tutorials)
    Please use [highlight=Java]//code goes here...[/highlight] tags when posting your code

  3. #3
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: How do I create these Java programs?

    You might be mistaken that these forums are a code service. I doubt anyone will spend their free (and unpaid) time doing this. My recommendation is, if this is your style of learning and you really wish to learn the language a) Read, study, and study again the tutorials already linked above and/or b) get a tutor to lead you through the process and customize your studies to fit your needs.

Similar Threads

  1. Create a file specifying the size JAVA
    By Harbox in forum Java Theory & Questions
    Replies: 3
    Last Post: September 20th, 2012, 10:30 AM
  2. create file in java
    By pokuri in forum Object Oriented Programming
    Replies: 2
    Last Post: January 19th, 2011, 10:42 AM
  3. How I can create those shapes with Java?
    By Learner in forum AWT / Java Swing
    Replies: 3
    Last Post: November 18th, 2010, 02:10 AM
  4. Java error "could not create java virtual machine"
    By aubrey4444 in forum Java Theory & Questions
    Replies: 17
    Last Post: October 3rd, 2010, 12:51 PM
  5. Java Loop and more Practical Programs
    By mparthiban in forum Loops & Control Statements
    Replies: 0
    Last Post: March 6th, 2010, 01:39 AM