Results 1 to 5 of 5
Like Tree1Likes
  • 1 Post By pbrockway2

Thread: So Proud of Myself - And Some Questions

  1. #1
    DaGamerChild is offline Member
    Join Date
    Jan 2013
    Posts
    1
    Rep Power
    0

    Default So Proud of Myself - And Some Questions

    So, following the guide I bought on Google Play "Java For Absolute Beginners", I was able to make a program. I've worked on RuneScape Private Servers in java before, but I never really knew much about what I was doing, I was just getting spoon fed. Now, I'm going to attempt to learn, self-taught, java. I want to design games in Java one day, and I'm starting small. So I'm going to post my program below. =D

    Java Code:
    package hello;
    
    import java.text.SimpleDateFormat;
    import java.util.Date;
    
    public class Hello {
    	
    	/**
    	 * This Is My First Program!
    	 */
    	
    	public static void main(String[] args) {
    		Date now = new Date();
    		SimpleDateFormat formatter = 
    				new SimpleDateFormat ("EEE, MMM dd, yyyy HH:mm:ss");
    		String formattedDate = formatter.format(now);
    		System.out.println(formattedDate + "> Hello, " + args[0] + "!");
    	}
    }
    So a question - what are some beginner exercises I can do? Where can I find some "dictionaries" to show me some basic stuff like the definitions of String, args, void, etc. I already know some of them, but I want to memorize others. Well, that's all!

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default Re: So Proud of Myself - And Some Questions

    Off the top of my head a few ideas:

    (1) Get familiar with Oracle's Tutorial. This is not structured as a beginning-to-end tutorial, instead it attempts to cover aspects of Java in a fairly comprehensive way. When you get stuck this is a good place to go to. Hence the suggestion that you get familiar with the outline of its contents, bookmark it, and use it.

    (2) Continue as you've started with small, feasible, programs. The trick here is to select a task you are interested in, but one that you can actually complete. It's no good going from printing the date to writing a client/server game. (If you look at posts here you will, occasionally see such leaps: more courageous than wise.) So it takes a bit of maturity, but is doable.

    (3) Find decent "usage" examples. (eg java2s.com, but there are many others) It can't be stressed enough that you should resist the temptation to copy and paste - such examples should suggest questions (line by line) that you need to follow up here, in Oracle's Tutorial, the API docs, whereever. And keep point (2) in mind and don't be led by other people's examples.

    ---

    Sorry, I don't know "Java for Absolute Beginners" or the other books that are around. Others may suggest something useful - especially something just comprehensive enough to get you going, but open ended enough to be creative. (Gone are the days when you introduce yourself to programming by reading the body of K&R's Bible in a weekend.)
    Zyril likes this.

  3. #3
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default Re: So Proud of Myself - And Some Questions

    As far as a "dictionary" is concerned Roedy Green is very good.

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,202
    Rep Power
    19

    Default Re: So Proud of Myself - And Some Questions

    DaGamerChild, please go through the Forum Rules, particularly the third paragraph.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  5. #5
    Zyril is offline Senior Member
    Join Date
    Oct 2011
    Location
    Sweden
    Posts
    124
    Rep Power
    0

    Default Re: So Proud of Myself - And Some Questions

    Try some of these:

    • Create a converter.
      Perhaps convert temperature between Celcius and Fahrenheit! Let the user input a temperature to convert.
    • Create a menu.
      Create a menu that is printed in the console with options, and depending on what the user inputs, 1, 2 or 3, the program does something unique.
    • Check if palindrome
      Perhaps a bit harder, but let the user input a word, and the program outputs whether it is true or false!
    • Reverse a string
      Let the user input a string, and then the program reverses it and prints it out! Do this both with the standard library method reverse() that can be found in one common class, and by your own code!


    As you perhaps notice, all of these involve some type of inputs, so I suggest that you learn to use the Scanner class that can be found in the Java API! This is very helpful for future projects. Look through the most commonly used classes, and check out their methods in the API, you can almost for sure find something useful or fun to make out of it!

    Tell me if you need any help! Good luck!

Similar Threads

  1. Some questions
    By Lundager in forum New To Java
    Replies: 7
    Last Post: 05-19-2012, 06:48 PM
  2. questions
    By amaliutz in forum New To Java
    Replies: 13
    Last Post: 02-02-2011, 06:13 PM
  3. questions regarding XML
    By Sparky in forum New To Java
    Replies: 4
    Last Post: 02-01-2011, 07:10 PM
  4. I have 2 questions =P
    By santa in forum New To Java
    Replies: 4
    Last Post: 01-19-2011, 05:35 PM
  5. questions for 1yr exp
    By rahaman.athiq in forum Java Servlet
    Replies: 2
    Last Post: 11-26-2008, 01:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •