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

Can a class have 2 constructors?

887


Explain the difference between abstract class and interface in java?

979


How do you generate random numbers in java?

1002


What is style and indentation?

1006


Why there are some null interface in java? What does it mean?

1119


What is a two-pass assembler?

1049


Can we have multiple catch block for a try block?

994


what is method reference in java 8?

1032


Can long be null in java?

1006


Explain exception chaining in java?

1161


What is an iterator java?

1098


What is mvc in java?

1009


How do you include a string in java?

979


What if the main() method is declared as private? What happens when the static modifier is removed from the signature of the main() method?

1181


I want my class to be developed in such a way that no other class (even derived class) can create its objects. Define how can I do so?

1168