• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Preparing for the SCJA

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys, I'm preparing for SCJA and I saw this exam topic about Concrete Classes. What is a concrete class. I can't seem to find it in the Java documentation, and even in my Java complete curriculum. Anybody can help me in finding a site where I can get info on concrete classes? Thanks so much.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://www.brpreiss.com/books/opus5/html/page610.html

Hope this helps.
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Really, a concrete class is one that is not abstract. If you can create an instance of a class by invoking its contstructor, it's concrete!
 
Author
Posts: 375
22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The following is an example of a concrete class:


You can create instances of this class as follows:



However, if you prefix the definition of class Person with the keyword abstract, it will then be termed as an abstract class, as follows:



Now, the following code will not compile:



The compiler will complaint that it cannot create objects of an abstract class. An abstract class, as its name suggests, is an incomplete representation of a concept. Hence, creation of its objects isn't allowed.

cheers
Mala
 
Tuesday Ganal
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Cameron Wallace McKenzie wrote:Really, a concrete class is one that is not abstract. If you can create an instance of a class by invoking its contstructor, it's concrete!



Thanks, Cameron. BTW, I'm reading your book SCJA Certification Guide.
 
Tuesday Ganal
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Triguna Mutuguppe Sripathi wrote:http://www.brpreiss.com/books/opus5/html/page610.html

Hope this helps.




Thanks, Triguna
 
Tuesday Ganal
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mala Gupta wrote:The following is an example of a concrete class:


You can create instances of this class as follows:



However, if you prefix the definition of class Person with the keyword abstract, it will then be termed as an abstract class, as follows:



Now, the following code will not compile:



The compiler will complaint that it cannot create objects of an abstract class. An abstract class, as its name suggests, is an incomplete representation of a concept. Hence, creation of its objects isn't allowed.

cheers
Mala




Thanks, Mala for differetiating an abstract from a concrete class. It helps
 
Mala Gupta
Author
Posts: 375
22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am glad, it does. A simple example is much more effective than reading 2 pages of theory.

cheers
Mala
 
reply
    Bookmark Topic Watch Topic
  • New Topic