Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is different between static and non static methods ,using
example

Answers were Sorted based on User's Feedback



what is different between static and non static methods ,using example..

Answer / siva

we should create object form calling Non static method but
no necessary to create object for calling static method
using class name we call static method

Is This Answer Correct ?    0 Yes 0 No

what is different between static and non static methods ,using example..

Answer / guest

Static:
we dont have to create instance of an object

Staic methods cannot access nonstatic methods.
same with variable static variables cannot access static
variables

Non-Static:
we have to create instance of an object
nonStaic methos canaccess nonstatic methods.
same with variable nonstatic variables can access static
variables

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Core Java Interview Questions

How do you define a set in java?

0 Answers  


How to overcome the exception object reference not set to an instance of object?

0 Answers   Wipro,


Why does java not support operator overloading?

0 Answers  


What are keywords give examples?

0 Answers  


Can we write method inside a method in java?

0 Answers  


Can an exception be rethrown?

4 Answers   Wipro,


When is an object in the mean to garbage collection?

3 Answers  


What is cloneable interface?

8 Answers  


Which is faster call by value or call by reference?

0 Answers  


How many types of thread in java? give the name

13 Answers   Cisco, NIIT,


Can inner class extend any class?

0 Answers  


What is synchronization? How it can be achieved?

2 Answers  


Categories