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 the output of the following Java program?
class Main {
public static void main(String args[]){
final int i;
i = 10;
System.out.println(i);
}
}

10. What is the output of the following Java program?
class Main {
public static void main(String args[]){
final int i;
i = 10;
System.out.println(i);
}
}

Answer Posted / hrindows@gmail.com

Output
10
Since i is the blank final variable. It can be initialized only once. We have initialized it to Therefore, 10 will be printed.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does this () mean in java?

984


Explain the importance of import keyword in java?

1012


Can we define private and protected modifiers for variables in interfaces?

1088


What is the difference between member variables initialization and assignment in a constructor?

1281


Is singleton class immutable?

971


What about member inner classes?

1096


What is the differences between c++ and java? Explain

1057


Is multiple inheritance supported by java?

999


How are the elements of a gridbaglayout organized?

1066


What does nullpointerexception mean?

1088


How to perform selection sort in java?

1002


What is volatile data type?

1014


What is the use of hashmap in java?

1090


How do you replace a string in java?

1010


What restrictions are placed on method overloading in java programming?

1053