This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes non static Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "non static" Watch "non static" New topic
Author

non static

santhosh.R gowda
Ranch Hand

Joined: Apr 06, 2009
Posts: 296
hi friends,

class a
{


{
System.out.println("not static");
}

public static void main(String args[])
{
a obj = new a();


}
}

here in my code each time when i create object not static is printing..... how it's so printing like that ..please explain me

Creativity is nothing but Breaking Rules
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10425
    
    8

http://www.coderanch.com/t/437097/Java-General-beginner/java/Blocks#1943127
You might also want to read this

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
GeeCON Prague 2014
 
subject: non static