hello, everybody....
i am new to java programming........so my question may be childish
i want to ask that.....in java all methods and variables are public...
by default(opposite to c++).so why we are writing public static void main(String args[]).main method can be accesed from anywhere
even if i dont write public bcoz it is by default public

Not quite. The default access modifier makes things public only to the same package. Any class in another package will not be able to access the methods/members.