Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Abstraction  RSS feed

 
NarendraMohan Prasad
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Someone asked me to do abstraction without using abstract keyword. and told possible ways but he didn'e agree. so that pls tell me how we do this.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only abstract thing in Java I can think of which doesn't need (but can use) the abstract keyword are interfaces.
 
Rajiv Babu
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What about wrapper classes? I can write wrappers to classes and abstract the actual implementation of the method from the user. Isnt this abstraction without using the keyword then? Even in case of patterns, factory pattern, abstract factory pattern etc, user does not know the actual implementation.
 
NarendraMohan Prasad
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi this not a way bcause we can use the wrapper object into our programs
 
Joe Ess
Bartender
Posts: 9429
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Was this "someone" your teacher? What are the "possible ways" you came up with?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!