Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-29-2008, 03:17 PM
Member
 
Join Date: Apr 2008
Posts: 2
milet is on a distinguished road
Need Help!
I need help if someone can make me an example of these 4 things in the same program that would be great!
loop, an array, an if-else statement, and methods
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-29-2008, 03:27 PM
DonCash's Avatar
Moderator
 
Join Date: Aug 2007
Location: London, UK
Posts: 239
DonCash will become famous soon enoughDonCash will become famous soon enough
Hello Milet, welcome to the Java Forums.

Have you actually attempted to do this yourself yet? The best way to learn is to do it!!

What you want to do is really quite simple and is the very basics of Java.

See what you can come up with and post back here and we can help you to correct any mistakes.

Also, please note, a more descriptive title in encouraged in these forums.
__________________
Did this post help you? Please
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
me!

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by DonCash : 04-29-2008 at 04:31 PM.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 04-29-2008, 09:54 PM
Member
 
Join Date: Apr 2008
Posts: 2
milet is on a distinguished road
Well when i say im new to java i mean very new so I am just looking for a example with all these with maybe a few notes in it to explain because I'm just trying to learn a few small things at the moment
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 04-29-2008, 10:20 PM
Zosden's Avatar
Senior Member
 
Join Date: Apr 2008
Posts: 386
Zosden is on a distinguished road
try my website it will teach correct Java programming techinques My Website
__________________
My IP address is 127.0.0.1
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 04-30-2008, 05:27 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,042
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Hi milet,

Welcome to our community.

Did you start to read any book or something on Java. If you are a really newbie for Java, it's better to refer well explained book my friend. Or you can read a well organized tutorial as well. Suns' official web site have a really nice tutorial.

On the other hand you can start work with simple tutorials too. Zosden have such a nice thing on his website.

Here is a simple code segment. But I'm not sure how far you an get it.

Code:
private void allInOne() { // Declaring an array of 5 elements int[] numbers = new int[5]; // Populating the array, using a for loop for(int i = 0; i < numbers.length; i++) { numbers[i] = (i * i * i); System.out.println(i + " element of the array is: " + numbers[i]); } // Display some elements on a if-esle statment for(int j = 0; j < numbers.length; j++) { if(numbers[j] < 10) System.out.println("Value of index " + j + " is less than 10."); else System.out.println("Value of index " + j + " is greater than 10."); } }
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(Close on September 4, 2008)

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 04-30-2008, 11:21 AM
DonCash's Avatar
Moderator
 
Join Date: Aug 2007
Location: London, UK
Posts: 239
DonCash will become famous soon enoughDonCash will become famous soon enough
Milet, the best place to start is at the Sun Java Tutorials!

The Java™ Tutorials

This site coveres everything you need to know in a clear and easy to understand manner! You'll learn alot there
__________________
Did this post help you? Please
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
me!

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +3. The time now is 10:27 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org