File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Associate Certification (SCJA,OCAJ 5/6) and the fly likes Preparing for the SCJA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Associate Certification (SCJA,OCAJ 5/6)
Bookmark "Preparing for the SCJA" Watch "Preparing for the SCJA" New topic
Author

Preparing for the SCJA

Tuesday Ganal
Greenhorn

Joined: Oct 27, 2010
Posts: 12
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.
Triguna Mutuguppe Sripathi
Greenhorn

Joined: Jun 20, 2008
Posts: 3
http://www.brpreiss.com/books/opus5/html/page610.html

Hope this helps.


Triguna
http://techobuzz.wordpress.com
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

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!
Mala Gupta
Author
Ranch Hand

Joined: Sep 27, 2002
Posts: 251
    
    9
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


Author of Manning's OCA Java SE 7 Programmer I Certification Guide and OCP Java SE 7 Programmer II Certification Guide
Tuesday Ganal
Greenhorn

Joined: Oct 27, 2010
Posts: 12
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

Joined: Oct 27, 2010
Posts: 12
Triguna Mutuguppe Sripathi wrote:http://www.brpreiss.com/books/opus5/html/page610.html

Hope this helps.



Thanks, Triguna
Tuesday Ganal
Greenhorn

Joined: Oct 27, 2010
Posts: 12
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
Ranch Hand

Joined: Sep 27, 2002
Posts: 251
    
    9
I am glad, it does. A simple example is much more effective than reading 2 pages of theory.

cheers
Mala
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Preparing for the SCJA