• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

final class  RSS feed

 
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.
 
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.
 
Saloon Keeper
Posts: 10245
216
  • 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.
 
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
 
What does a metric clock look like? I bet it is nothing like this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!