• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java static keyword application  RSS feed

 
ravi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am Ravi. I came across a application of the static keyword but i could not write a program to see how it works. It is "a return statement without any parameters can be given in a static initialization block". Anybody please help me?

Thank You,
cosmicravi
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

a return statement without any parameters can be given in a static initialization block

Where did you see this? ONe way to find out is to try it:

See if you can compile that and you'll have your answer.
[ April 11, 2005: Message edited by: Paul Sturrock ]
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ravi,

Welcome to JavaRanch!

Hi,

Welcome to JavaRanch!

First, a bit of business: you may not have read our naming policy on the way in. It requires that you use a full, real (sounding) first and last name for your display name. "Handles" and joke names aren't OK here. You can change your display name here. Thanks!

Second, please don't post your questions in more than one forum. It just wastes people's time if they give a detailed answer in one copy of your thread if someone's already answered another copy.

Third, be sure to post your questions in the right forum. This one has nothing to do with servlets, so normally I would delete it since there's a duplicate in Java in General (Intermediate.) Since it's been answered, I'll delete that other copy, then move this thread there.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!