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...

can a static method be overridden

Answer Posted / kiran sangeri

no,bcos look at below code

package test;

class A {
static void something () {
System.out.println("class A");
}
}

class B extends A {
static void something () {
System.out.println("class B");
}
}


public class ClassC {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
A anA = new B ();
anA.something ();
}

}

Output : class A

so Class A is not been overridden.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

difference between  ejb,struts,hibernate,spring and jsp

2810


What is the RMI and Socket?

1011


Where we can write Rmi registry in the code, without having to write it at the command prompt?

2730


which type of objects reference will be given to client?

2434


What is the highest-level event class of the event-delegation model?

1034


What is the map interface?

1079


What is the infobus?

1036


In our urls and in the text of the buttons we have comma. Its causing an error. Is there a way to change the delimiting character for the menu arguments?

1120


the same information whether it will connect to the database or it will be used previous information?

994


Describe activation process?

2603


What’s jboss cache in short?

1061


Can I run seam with jdk 1.4 and earlier?

939


How to pass parameters in RMI?

2221


What is the difference between the session.update() method and the session.lock() method?

965


Explain what is orm?

1066