Comment on Tutorial - Inner Class Example in Java By Tamil Selvan

Comment Added by : shahalam shaikh

Comment Added at : 2012-02-13 21:08:30

Comment on Tutorial : Inner Class Example in Java By Tamil Selvan
here is one more inner class example
public class Account {
protected static int accNo=1000025475;
protected String accHolderName;
protected double bal;
public Account()
public Account(String accHolderName, double bal)
this.accHolderName = accHolderName;
this.bal = bal;
public String toString() {
return "accNo="+accNo+"\naccHolderName=" + accHolderName + ", \nbal=" + bal
public static class Locker
int lockerId=2542;

public Locker()

public String toString() {
return "LockerId="+lockerId;

public static void main(String[] args){

Locker l1=new Locker();
Account a2=new Account("saleem",5125.24);
Locker l2=new Locker();
Account a3=new Account("arif",15847);

View Tutorial

Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. how to use tokenizer "No.1 hello,No.2 world,N
View Tutorial          By: saanu at 2011-03-04 00:41:21

2. This example has helped me a lot.! kudos to the wr
View Tutorial          By: Disha Sareen at 2014-12-24 09:30:12

3. is this code applicable if I used USB GSM Modem? a
View Tutorial          By: Rania at 2010-09-14 12:33:15

4. dummy piece
View Tutorial          By: Dummy at 2011-07-29 09:40:11

5. array is the one which can save similar data typed
View Tutorial          By: Cegonsoft Reviews at 2011-07-26 00:54:18

6. it was nice and helpful for me.
View Tutorial          By: mayank at 2015-03-01 08:35:48

7. The only thing that really was the solution to my
View Tutorial          By: nick marinho at 2010-07-24 17:45:59

8. Hi,
I have problem of calling javascript fu

View Tutorial          By: Shakti Prasad Priyakumar at 2008-06-06 06:11:52

9. Hello all,Actually i want xml parser in blackberry
View Tutorial          By: arun at 2011-06-01 06:17:16

10. The !isset() is basically checking if the string i
View Tutorial          By: Bijan at 2012-09-21 20:49:41