943,900 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 768
  • Java RSS
Dec 17th, 2008
0

What are static and abstract methods?

Expand Post »
What are static and abstract methods?What are the advantages of using them?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Ninad16 is offline Offline
8 posts
since Oct 2008
Dec 17th, 2008
0

Re: What are static and abstract methods?

What is food? What is water? What are the advantages of eating food and drinking water...?

At least make an attempt at understanding things before posting obvious questions whose answers can be easily found out using search engine of your choice.

Let's say that putting a bit of effort on your part and trying to understand things on your own is the first step towards enlightenment, my young padawan.
Super Moderator
Featured Poster
Reputation Points: 3233
Solved Threads: 719
Failure as a human
~s.o.s~ is offline Offline
8,871 posts
since Jun 2006
Dec 17th, 2008
0

Re: What are static and abstract methods?

That would seem to go against this poster's nature, given their current post history.
Moderator
Featured Poster
Reputation Points: 3239
Solved Threads: 839
Posting Genius
Ezzaral is offline Offline
6,761 posts
since May 2007
Dec 17th, 2008
0

Re: What are static and abstract methods?

1. An abstract method is a method that is declared without an implementation,also the abstract method is very useful for design pattern like factory and any class contains this method is abstract class.
For example, java.net.SocketImpl is an abstract class. It is used to create both client and server sockets.
2. static methodtatic means one per class and not for each object you can use them without creating an instance of a class.
For example java.lang.Math, this class has all static fields and methods. Also a singleton class uses static method is very useful for resource pools (database connection,etc.....).



Albert
Reputation Points: 9
Solved Threads: 2
Light Poster
AlbertPi is offline Offline
33 posts
since Nov 2008
Dec 19th, 2008
0

Re: What are static and abstract methods?

people who find this query very obvious and basic,please don't respond.Please don't make personal attacks.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Ninad16 is offline Offline
8 posts
since Oct 2008
Dec 19th, 2008
0

Re: What are static and abstract methods?

There are no personal attacks, as far I can see s.o.s and Ezzaral stated obvious they you lack any interest in personal development as you just forsaken basic search of available resources of Sun for example (abstract and static) plus many others
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 873
Code tags enforcer
peter_budo is offline Offline
6,656 posts
since Dec 2004
Dec 19th, 2008
0

Re: What are static and abstract methods?

> people who find this query very obvious and basic,please don't
> respond.Please don't make personal attacks.

You are too oblivious to realize that you never asked a query; it was a request for someone else to do your homework. Nowhere in your post have you shown any traces of having put any effort to solve the problem at hand.

And BTW, dear `Ninad16', don't PM me telling me what I should and shouldn't do. You can't tell someone to *not* reply to your threads as long as they replies follow the forum rules and stay on topic. And yes, I felt a need to chastise an *obvious* question since you were violating a forum rule and I felt it necessary to put you on track. Read the forum announcements.
Super Moderator
Featured Poster
Reputation Points: 3233
Solved Threads: 719
Failure as a human
~s.o.s~ is offline Offline
8,871 posts
since Jun 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: KeyListener
Next Thread in Java Forum Timeline: play incompleted music file





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC