Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp

Alex Fon

Greenhorn
+ Follow
since Oct 17, 2000
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Alex Fon

example of my usage:
I have class Errors for all error numbers definitions. All numbers are defined as static members to have access without creating class instance.
Now I want some errors hierarchy: for example separate Login and NewUser errors:
//---------------------------------------------------
public class Errors
{
public static final int UNEXPECTED = 0;

public class Login
{
public static final int PASSWORD_DOESNT_MATCH = 1;
public static final int USER_DISABLED = 2;
public static final int USERSELF_DISABLED = 3;
public Login(){};
}
public static Login jspLogin;

public class NewUser
{
public static final int SOME_FIELDS_MISSED = 1;
public static final int CANNOT_SAVE_TO_DB = 2;
public NewUser(){};
}
public static NewUser jspNewUser;
}
//------------------------------------------------
example of usage:
if (myError == Errors.jspLogin.PASSWORD_DOESNT_MATCH)
{
..........
}
23 years ago