• Post Reply Bookmark Topic Watch Topic
  • New Topic

final class  RSS feed

 
Mathew Lee
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I read

http://www.jchq.net/certkey/0102certkey.htm
program

final class Base{

public void amethod(){
System.out.println("amethod");
}
}

public class Fin{
public static void main(String argv[]){
Base b = new Base();
b.amethod();
}
}


I was not clear on output. Whether Base class is final or not output did not change. How final effects output here. Any ideas, resources, links, sample code highly appreciated. thanks in advance.
 
Edwin Torres
Ranch Hand
Posts: 57
Java Linux Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your link explains the final modifier well enough. It is not going to change the output whether you have it there or not. Re-read the section on the final modifier at your link.
 
Stephan van Hulst
Saloon Keeper
Posts: 7993
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mathew, have you read the Oracle tutorials?

Check them out here:
http://download.oracle.com/javase/tutorial/

If you still have questions after *thoroughly* reading the tutorials, come back to the topics you have created thus far.
 
Mohamed Sanaulla
Bartender
Posts: 3185
34
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And please UseCodeTags for posting the code
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!