aspose file tools*
The moose likes Beginning Java and the fly likes absctract class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "absctract class" Watch "absctract class" New topic
Author

absctract class

jacob deiter
Ranch Hand

Joined: Apr 02, 2008
Posts: 576
abstract class abstractclass {

abstract void fgf();

{
fgf();
System.out.println("hi");
}

}


please explain code in bold.Bold block is static method or anonymous class or what is this?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39773
    
  28
Please use the code button; don't put bold tags inside it.
Where does that code come from, or did you concoct it yourself?
The block you have marked looks like an instance initialiser.
Ryan Beckett
Ranch Hand

Joined: Feb 22, 2009
Posts: 192
The block with only delimiters is a static initializer block.
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18966
    
  40

Ryan Beckett wrote:The block with only delimiters is a static initializer block.



Actually, the code in bold is an instance initializer block. (which Campbell already mentioned).

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: absctract class