Welcome Guest | Sign in | Register
Final and Datatypes - Discussion Page For Q.2747 | Java Programming Questions and Answers | Java Programming Free Online-Tests | LucentBlackBoard | LucentBlackBoard.com

Home > Java Programming > Final and Datatypes > Questions and Answers

Q: Class F
{
Static void test(Byte I,Byte j){
System.out.println(“BByte”);
}
Static void test(byte …b){
System.out.println(“byte”);
}

Public static void main(String args[]){
byte s=10;
test(s,s);
}
}
A. compile time error B. runtime error
C. BByte D. byte

Answer and Explanation

Answer:byte

Explanation:
Here test(s,s) will call test(byte…b) because these two are of type primitive.where as test(Byte , Byte) is of type class so it will not get called.

Comment on this Question

Name:

Loading...




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved 2012-2015 SoftLucent.