• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

static class

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Class Modifier can be
[public , protected , private , abstract , static , final and strictfp
] class box
{
...
...
}
Please correct if I am wrong.
Abstract - Implementation is incomplete.
final - Final and cannot be subclassed.
strictfp - float conversion of all local var , mem variable.
static - ?? when a class can be static?
public - only one public class in a file.
protected - what ?
private - what?
some brief explanation on static , public , protected and private for class modifiers
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
public means that it can be used by just about anything, it's a 'friendly class
private means that it can only be accessed with in that package, or 'un-friendly'
other than that i know but i don't, know what i mean?
 
Trailboss
Posts: 23778
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All of those are valid class modifiers except strictfp - I've never heard of that one.
Some of those modifiers can only be used on inner classes: protected, private, and static
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
strictfp is a real keyword in Java 1.2, and it is a valid class modifier. It's defined in this PDF document, which can be found from the JLS by going to Clarifications and Amendments.
Sun is long overdue to produce an updated JLS that incorporates these changes. At the very least they need to get rid of that stupid PDF file and replace it with HTML. Ah well...
 
Jim Yingst
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hah! My wish is on its way to being granted, it appears. Check this out.
Ah, finally. I'll be waiting impatiently.
 
If you open the box, you will find Heisenberg strangling Shrodenger's cat. And waving this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic