![]() |
Channels | ![]() |
In Focus |
Cartoons |
Education |
Environment |
Opinion |
Photo Essays |
Columns |
Business |
Random Thoughts |
Our Heritage |
Astrology |
Ayurveda |
Buddhism |
Cinema |
Culture |
Festivals |
Hinduism |
History |
People |
Places |
Sikhism |
Spirituality |
Society & Lifestyle |
Parenting |
Perspective |
Recipes |
Society |
Teens |
Women |
Creative Writings |
Computing |
Humor |
Individuality |
Literary Shelf |
Memoirs |
Quotes |
Stories |
Travelogues |
Workshop |
Computing | Share This Page | |||
Arrays and Overloading in Java |
||||
by Deepak Chandrasekaran |
![]() |
|||
In the last article, we dealt with strings, variable initializations and castings. This week lets have a look at the array feature of java and also on a special feature called Operator Overloading. Arrays in Java Java has a built in array class which you can use to hold multiple values provided those values are of the same data type. int[] intArray = new int[40]; This array would hold 40 ints numbered from 0-39. Another cool feature of Java is that methods in Java can easily be overloaded such that the same method name can be used for several different implementations of the same action. For example printNumber(), printLetter(), printImage() are the various methods that can be used for several different implementations of the same action. int add(int a, int b) float add(float a, float b) |
||||
Share This: | ||||
07-Feb-2002 | ||||
More by : Deepak Chandrasekaran | ||||
Top | Computing | ||||
Views: 5342 Comments: 1 | ||||
Comments on this Article
Reena Baliyan 06/20/2011 00:36 AM |
||||
| ||||