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

I declared main() method as private. But it still running
and displaying the output. Please Answer it .
Code Snippet as Below:
import java.io.*;

class over
{
private static void main(String[] args)
{
int high = Integer.MAX_VALUE;
int overflow = high + 1;

int low = Integer.MIN_VALUE;
int underflow = low - 1;

System.out.println(high + "\n" +overflow +"\n"+
low +"\n"+underflow);
//System.out.println(overflow);
//System.out.println(low);
//System.out.println(underflow);
}
}

Answer Posted / kumaresan.r

Hai,
When you compile program it will run with out error,bt it
did not show the value of high,low,underflow.it just show that

"Main method not public.

Process completed.".

So we cant say that this is an output.

Is This Answer Correct ?    15 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where local and global variables are stored?

1086


Does importing a package imports its sub-packages as well in java?

977


Which is the best approach for creating thread ?

1217


What is the function of http?

1034


How is the marker interface used in Java?

1103


What is meant by object?

1010


What is primitive data type in java?

988


Does substring start with 0?

990


What do you mean by buffering?

1048


What is the difference between throw and throws keywords?

1056


Why java is used everywhere?

1014


What is try-with-resources in java?

1178


What are the 4 types of research methods?

926


Name and explain the types of ways which are used to pass arguments in any function in java.

1081


What is the longest unicode character?

1156