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
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)
Re: keyword definitions needed
Quote:
Originally Posted by
Norm
hi,
I did but I do not know if some information is correct for what I need
Re: keyword definitions needed
Post the things you are unsure of and explain what you are unsure of.
Re: keyword definitions needed
Quote:
Originally Posted by
Norm
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
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.