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

Thread: keyword definitions needed

  1. #1
    Junior Member
    Join Date
    Dec 2012
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation keyword definitions needed

    Hi, I am new and only just found out this forum

    im doing computing and business in uni and the way the lecture is teach us java allows me to work hard in the lesson but for all techniques and keywords to brush out of my head in a matter of hours, I tried taking notes but then i just don't understand them

    then I came up with a way to take notes, anyway its week 8 and we are doing arrays, collections lists and loops

    please could anyone give me an easy explaination with probally an example to these keywords

    Diamond notation - what is it and example of how I use it
    arrays -
    array lists
    collections
    importing
    while and for loops
    .length


    thank you
    dan


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,162
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: keyword definitions needed

    Google should be the first place to look for definitions.

    For java specific stuff, look in the tutorial:
    The Really Big Index
    Trail: Learning the Java Language: Table of Contents (The Java™ Tutorials)
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Dec 2012
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: keyword definitions needed

    Quote Originally Posted by Norm View Post
    Google should be the first place to look for definitions.

    For java specific stuff, look in the tutorial:
    The Really Big Index
    Trail: Learning the Java Language: Table of Contents (The Java™ Tutorials)
    hi,

    I did but I do not know if some information is correct for what I need

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,162
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: keyword definitions needed

    Post the things you are unsure of and explain what you are unsure of.
    If you don't understand my answer, don't ignore it, ask a question.

  5. #5
    Junior Member
    Join Date
    Dec 2012
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: keyword definitions needed

    Quote Originally Posted by Norm View Post
    Post the things you are unsure of and explain what you are unsure of.
    public class Month
    {
    private int [] months = {31,28,31,30,31,30,30,31,30,31,30,31,99};
    private int[] fib = new int[10];

    public Month()
    {

    }

    public void print()
    {
    for(int i=0; i < months.length;i++)
    {
    System.out.println(months[i]);
    }
    }

    public void fibSeries()
    {
    fib[0] = 0;
    fib[1] = 1;
    for(int i=2;i<fib.length;i++)
    {
    fib[i] = fib[i-1] + fib[i-2];
    }

    for(int i=0;i<fib.lenght;++)
    {
    System.out.println(fib[i]);
    }
    }
    }

    how are collections used in this

  6. #6
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,162
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: keyword definitions needed

    There isn't a natural place to use a collection with purely numeric data.

    You could replace the int array: fib with an ArrayList, but the conversions from int to Integer would make the code unusual.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. [SOLVED] The 'new' Keyword
    By TheSlowLearner in forum Object Oriented Programming
    Replies: 17
    Last Post: August 7th, 2012, 12:05 AM
  2. Replies: 4
    Last Post: December 6th, 2011, 02:24 PM
  3. Super Keyword
    By shruthi in forum Java Theory & Questions
    Replies: 12
    Last Post: October 13th, 2011, 03:31 PM
  4. keyword Extends
    By chronoz13 in forum Object Oriented Programming
    Replies: 3
    Last Post: November 27th, 2009, 07:30 AM
  5. How to highlight search keyword in text?
    By Mohd in forum JavaServer Pages: JSP & JSTL
    Replies: 4
    Last Post: February 1st, 2009, 06:35 AM