Right Place For Right PersonTM 
Sponsored Ads
Buy This Website(This website is for Sale)
Home Tutorials Articles Forums Source Code Books Certifications Interviews Questions

Go: 1 2 3

R4R --->Java --->> SCJP1.5 Chapter04 --> Sun Java Certification

Page 1

Question:
Assertion Expression Rules
Post Your View

Answers
We can suppose the assume that a number passed into a method (say, methodA()) will never be negative. While testing and debugging, We want to validate our appicationbut we font want to have to strip out print statements, runtime exception handlers, or if/else tests whenwe were done with development  More --- >>

By:UMANG
Date:01.03.09

Question:
Assertions Overview
Post Your View

Answers
this code we can seeee the proper use of assertion and and distinguish appropriate from inappropriate uses of assertions. Identify correct statements about the assertion mechanism. if (x > 2 && y) { // do something } else if (x < 2 || y) { // do something } else { // x must be 2 // do somethi  More --- >>

By:UMANG
Date:01.03.09

Question:
Compiling Assertion-Aware Code
Post Your View

Answers
If we 'were using this keyword then we must explicitly enable assertion awareness at compile time.  More --- >>

By:UMANG
Date:02.03.09

Question:
Compiling with Assertions
Post Your View

Answers
we know whats in this code : int assert = getInitialValue(); if (assert == getActualResult()) { // do something } IN the preceeding code assert is used as an identifier,assert is now a keyword! The bottom line is we can use “assert” as a keyword or as an identifier, but not both..We're   More --- >>

By:UMANG
Date:02.03.09

Question:
Compiling with Code That Uses Assert as an Identifier
Post Your View

Answers
If we dont use the -source 1.4 flag, then the default behavior is as though we said to the compiler, “Compile this code as if we didn’t known anything about assert as a keyword, so that I may use the word assert as an identifier for a method or variable.”  More --- >>

By:UMANG
Date:02.03.09

Question:
Conditional (boolean) Expression
Post Your View

Answers
in the for lop next section is the conditional expresion which is in the evauateon of the boolean values .we can have only one logical expression, but its very complex. for (int x = 0; ((((x < 10) && (y-- > 2)) | x == 3)); x++) { } The preceding code is legal, but the following is not: for  More --- >>

By:UMANG
Date:01.03.09

Question:
Creating a Labeled while Loop
Post Your View

Answers
When we are trying to labeled for the while loop , we would t make the lable .Within the loop, it should increment the age by one. Every time it goes through the loop, it checks whether the age is 16. > The outer label should appear just before the while loop begins. It does not matter if it is on  More --- >>

By:UMANG
Date:01.03.09

Question:
Creating a switch-case Statement
Post Your View

Answers
When we will trying char in the switch case statement value as this case ,Include a default behavior if none of the char values match : > Make sure a char variable is declared before the switch statement. > Each case statement should be followed by a break. > The default value can be located at  More --- >>

By:UMANG
Date:01.03.09

Question:
Declaration and Initialization
Post Your View

Answers
firstly we have a for statement lets we declare and initialize zero, one, or multiple variables of the same type inside the parentheses after the for keyword. if we would like to declare the same type of variable which is more than one When we 'll need to separate them with commas as follows : for   More --- >>

By:UMANG
Date:01.03.09

Question:
Default, Break, and Fall-Through in switch Blocks
Post Your View

Answers
When the programe execute with the break statement, it will immediately move out of the switch block to the next statement after the switch. for the example we have a code : int x = 1; switch(x) { case 1: System.out.println("x is one"); case 2: System.out.println("x is two"); case 3: System.ou  More --- >>

By:UMANG
Date:01.03.09

Question:
Disabling Assertions at Runtime
Post Your View

Answers
We must also know the command-line switches for disabling assertions. java -da com.geeksanonymous.TestClass or java -disableassertions com.geeksanonymous.TestClass  More --- >>

By:UMANG
Date:02.03.09

Question:
Do not use assert expressions that can cause side effects!
Post Your View

Answers
The following would be a very bad idea: public void doStuff() { assert (modifyThings()); // continues on } public boolean modifyThings() { x++ = y; return true; } The rule is: An assert expression should leave the program in the same state it was in before the expression!  More --- >>

By:UMANG
Date:02.03.09

Go: 1
2 3 Contact Us
Sponsored Ads
Sponsored Ads
Sponsored Ads
Sponsored Ads
Sponsored Ads
Interview Questions And Answers
Struts interview questions and answers (Subjective)
500 Java Objective Questions and Answer
Core Java Objective Questions And Answers
Core Java Subjective Questions And Answers
Core Java Interview Questions And Answers
Core Java Interview Questions and Answers (Subjective)
Core Java Interview Questions and Answers( Objective)
50 Servlet interview questions
155 Java Interview Questions
EJB Interview Questions and Answers(Subjective)
R4R,JSP Interview Questions and Answer(Subjective)
R4R,Java Servlets Interview Questions and Answers(Subjective)
Core Java Subjective ,Objective and Interview Questions And Answers
275 Core java interview questions
Java Objective Questions and Answer
Java Architect Interview Questions
Applet Interview Questions and Answers
Core Java example
Servlet Objective Questions And Answers
Servlet Subjective Questions And Answers
Servlet Interview Questions And Answers
JSP Objective Questions And Answers
JSP Subjective Questions And Answers
JSP Interview Questions And Answers
JDBC Objective Questions And Answers
JDBC Subjective Questions And Answers
JDBC Interview Questions And Answers
JDBC Interview questions and answers
Networking Interview questions and answers
Servlets Interview questions and answers
EJB Objective Questions And Answers
EJB Subjective Questions And Answers
EJB Interview Questions And Answers
Hibernate Objective Questions And Answers
Hibernate Subjective Questions And Answers
Hibernate Interview Questions And Answers
Spring Objective Questions And Answers
Spring Subjective Questions And Answers
Spring Interview Questions And Answers
Struts Objective Questions And Answers
Struts Subjective Questions And Answers
Struts Interview Questions And Answers
Ant Objective Questions And Answers
Ant Subjective Questions And Answers
Ant Interview Questions And Answers
PHP Objective Questions And Answers
PHP Subjective Questions And Answers
PHP Interview Questions And Answers 1
ASP.net Objective Questions And Answers
ASP.net Subjective Questions And Answers
ASP.net Interview Questions And Answers 1
ASP.net interview questions ,ASP.net interview answers,ASP.net interview questions and answers
PHP interview questions ,PHP interview answers,PHP interview questions and answers
Testing Objective Questions And Answers
Testing Subjective Questions And Answers
Testing Interview Questions And Answers
Ajax Tutorials
Ajax Objective Questions And Answers
Ajax Subjective Questions And Answers
Ajax Interview Questions And Answers
Linux Objective Questions And Answers
Linux Subjective Questions And Answers
Unix Subjective Questions And Answers
Unix Interview Questions And Answers
HR interview questions and answers
HR Interview Questions Tips
HR Objective Questions And Answers
HR Subjective Questions And Answers
HR Interview Questions And Answers
Learn C Language with in a day
 C /C++ Questions
C Objective Questions And Answers
C Subjective Questions And Answers
C Interview Questions And Answers
C Objective Interview Questions And Answers(10)
C Subjective Interview Questions And Answers(100) 
C syntax,semantics and simple programming questions(61) 

Linux Interview Questions And Answers
Unix Objective Questions And Answers
C Aptitude Questions(179)
C++ Interview Questions And Answers    
C++ Objective Questions And Answers
C++ Subjective Questions And Answers
C++ Interview Questions And Answers
C,C++ objective Interview Questions and answers
C Interview Questions And Answers( Objective and Subjective)
C Objective Interview Questions And Answers(10)

C Subjective Interview Questions And Answers(100)

C,C++ Interview Questions

35 C++ Interview Questions And Answers(Subjective)

109 C++ Interview Questions

Java Script Interview Question and Answer(1-10).
 Java Script Interview Question and Answer(11-20).
Java Script  Interview Question and Answer(21-30).
Java Script Interview Question and Answer(31-40).
Javascript Objective Questions And Answers
Javascript Subjective Questions And Answers
Javascript Interview Questions And Answers
MFC Interview Questions And Answers(Subjective)

MFC Interview Questions And Answers(Subjective)

ATL Interview Questions And Answers(Subjective)

COM DCOM Interview Questions And Answers(Subjective)

Win32API Interview Questions And Answers(Subjective)

ActiveX Interview Questions And Answers(Subjective)

R4R, VC++ AllOther Interview Questions And Answers(Subjective)

PL/SQL Interview Questions And Answers(Subjective)

152 PL/SQL Interview Questions And Answers(Subjective)

Asp Objective Questions And Answers
Asp Subjective Questions And Answers
Asp Interview Questions And Answers 1

VB Objective Questions And Answers

Contact US:

Your Name:


Your Email:

Message:

Comments:

Give Your Comments:

Your Name:
Your Email ID :
Comments :

Advertiser PRIVACY POLICY ||User PRIVACY POLICY || R4R Group Srvices