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

Difference between start() and run() method of thread class?

995


What about interrupt() method of thread class ?

1011


What is e java?

1022


What is JFC?

1159


What is the difference between overriding & overloading?

1002


What is palindrome in java?

928


What is meant by attribute?

1032


Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?

1541


What is core java used for?

1050


Can you extend singleton class?

1034


What do you mean by synchronized non access modifier?

942


Why multiple inheritance is not supported by java?

927


what is heap memory?

1038


Explain numeric promotion?

1023


Explain all java features with real time examples

1659