Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Java
»
Beginning Java
Author
Static class??
Vishnu Sharma
Ranch Hand
Joined: Feb 03, 2010
Posts: 55
posted
Apr 19, 2010 00:15:18
0
Can we make any class static?? Or only methods & variables in a class can be static??
Regards,
Vishnu
Devaka Cooray
Saloon Keeper
Joined: Jul 29, 2008
Posts: 2691
3
I like...
posted
Apr 19, 2010 00:19:24
0
a nested class can be static
Author of ExamLab (
Download
) - the free mock exam kit for SCJP / OCPJP
Home Page
--
Twitter Profile
--
JavaRanch FAQ
--
How to Ask a Question
Vishnu Sharma
Ranch Hand
Joined: Feb 03, 2010
Posts: 55
posted
Apr 19, 2010 01:21:12
0
Devaka Cooray wrote:
a nested class can be static
I did not get you properly. Can you please, explain a bit more giving any small example??
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12911
3
I like...
posted
Apr 19, 2010 01:23:12
0
Example:
public class Example { public static class NestedStaticClass { // ... } }
For more information, see:
The Java Tutorials - Nested Classes
Java Beginners FAQ
-
JavaRanch SCJP FAQ
-
The Java Tutorial
-
Java SE 7 API documentation
Scala Notes
- My blog about Scala
I agree. Here's the link:
http://ej-technologies/jprofiler
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: Static class??
Similar Threads
doubt on Inner class
static and serialization
Inner Classes Q
Static Class
static class
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter