As long as you don't care if anyone else can look at your code and understand it, you are free to do it any way you want.
Then why are you posting your code here?
Type: Posts; User: Norm
As long as you don't care if anyone else can look at your code and understand it, you are free to do it any way you want.
Then why are you posting your code here?
Some more comments on your coding style;
Class names should start with uppercase letters:
class class1{
vs
class Class1{
Put some white space in the statement to make them easier to read:...
Don't limit their use to if statements.
There is always a time you decide later and in a hurry to insert some statement at the front end of some code that is naked (without {}s) and voila a bug. ...