User-submitted Java Projects

29
2258 reads

February 11, 2013

Array Declaration and Addition


This example illustrates two way for array declaration and add them with corresponding values after that print them with all values.

31
1236 reads
Contests
Write the code for Lemon & Spoon race.
Run It Now!
128
2455 reads

February 11, 2013

Classes in arrays


This shows that we can use Objects in arrays too!

51
2255 reads

February 11, 2013

Modify default constructor


Here we show how to modify the default no args constructor.

38
2344 reads

February 11, 2013

TwoD Array


Multidimensional arrays are actually arrays of arrays. These, as you might expect, look and act like regular multidimensional arrays.

59
2379 reads

February 11, 2013

Average of array elements


First of all we have to define a class that has double type array to contain some values. These values will all be of double type.

53
2632 reads

February 11, 2013

What is array?


When you need to store same ‘type’ of data that can be logically grouped together, then you can go for java array.

51
2666 reads

February 11, 2013

Lifetime


We know a variable declared within a block will lose its value when the block is left.
Thus the lifetime of a variable is confirmed to its scope.

29
2565 reads

February 11, 2013

Scope


Scope refers to the visibility of variables. In other words, which parts of your program can see or use it. Normally, every variable has a global scope.

55
2572 reads

February 11, 2013

Variables


Variables are made to hold varying values.These can be reassigned as & when reqd.