Thursday 6 December 2012

EXCEPTION HANDLING....CONT

 EXCEPTION HANDLING....CONT
ASSERTIONS:

    The most typical way of debugging is to use program.out.println() 's but the issue with these program.out.println() is after bug solving necessary we should eliminate these program.out.println() otherwise at playback these needless s.o.pln's will be executed and results the functionality of the program.
    To get over this issue sun individuals has presented declaration idea in 1.4 edition the solving it is not needed to wipe out claim stmts clearly depending on our need we can allow or turn off claim stmt and by standard declaration are turn off.
    Usually statements idea is program only for analyze growth atmosphere but not growth.

ASSERT AS KEYWORD AND IDENTIFIER:
-

    Assert keyword has presented in 1.3 edition we can claim as identifier

class assertEX
{
public fixed gap main(string[] args)
{
int assert=10;
System.out.println(assert);
}
}

OUTPUT:-
>javac AssertEX.java
As if rease 1.4 claim is a keyword and may not be used as a identifier
>javac-source 1.3 AssertEX.java
>java AssertEX
10

NOTE:-

     We can gather any coffee resource computer file according to a edition by using "source edition name" choice.

No comments:

Post a Comment