File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Query" Watch "Query" New topic
Author

Query

vibhas karn
Greenhorn

Joined: Aug 11, 2008
Posts: 26
Can any buddy please help me to understand few basic concepts...I have following queries:-
1>Why a class and interface can't be declare as static?
2> What constructor really is and why we can't declare it as static abstract.
3>What does it mean that local variables are on the stack and not in the heap?
4>And why we call that the bit depth of boolen primitive type is virtual machine dependent?

Please send the reply soon......
Larry Frissell
Ranch Hand

Joined: May 16, 2008
Posts: 82
    
    2
I found many of the answers to your questions by just putting them in the "Search" above. Try that first.
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

please use search utility in Javaranch before post. or see the details here.


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
minal silimkar
Ranch Hand

Joined: Nov 25, 2007
Posts: 133
Originally posted by, Vibhas Karn


Can any buddy please help me to understand few basic concepts...I have following queries:-
1>Why a class and interface can't be declare as static?

when you declares the member as static, it means that member is class related & not to the object related. There is no meaning to declare interface as static, because interfaces are made to beimplemented by the other classes, so it can not related to any specific class.


2> What constructor really is and why we can't declare it as static abstract.

Constructor is method like, but not method, which is mainly used for initialization of instance variables.
If you declare any method as abstract you must provide implementation in its imediate concrete class by overriding it.
But you can not override constructors.

Learn more on basics
[ August 12, 2008: Message edited by: minal silimkar ]

Minal Silimkar
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Query
 
Similar Threads
Abstract Methods and Classes
static members and local classes
static problem
static Methods @ Interface
Why can't declare a Static method in Interface?