This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes final methods Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply locked New topic

final methods

Hasitha Randika
Ranch Hand

Joined: Sep 04, 2007
Posts: 50
class A{
private final void method1(){
class B extends A{
public final void method2(){
class C{
public static void main(String ar[]){

here the answer is "b".can we override the final method in class A?
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074

Note: If you notice, after posting, that you made a mistake, then you can edit your own post to correct it by clicking the button. You don't need to start a new post.

And please use code tags when you post code, so that the forum can display your code properly.

Continue in your other post.

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:
subject: final methods
Similar Threads
Question on "instanceof"
Hiding of instance variables. Hard question?
overriding ??
final method
Problem -- Virtual Method Invocation