Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JNDI What is the output if....

Have Programming Question? Ask it here!
 
 
 


Jackson
What is the output if....
1 Answer(s)      3 years and 4 months ago
Posted in : JNDI


Here is my code. what is the output if a. the value of lowerLimit is 50? b. if the value of lowerLimit is 150?

int lowerLimit; ... try { System.out.println("Entering the try block.");

if (lowerLimit < 100)
    throw new Exception("Lower limit violation.");

System.out.println(Exiting the try block.");

}

catch (Exception e) { System.out.println("Exception: " + e.getMessage()); }

System.out.println("After the catch block");


Advertisement
View Answers

March 25, 2011 at 10:36 AM


When we put 50 as a lower limit value, output comes:

Entering the try block.
Lower limit violation.
After the catch block

When we put 150 as a lower limit value, output comes:

Entering the try block.
Exiting the try block.
After the catch block


Related Tutorials/Questions & Answers:
What will be the Output?
What will be the Output?  int[] number = {5,3,6,10,1} int temp; for (int i=0; inumbers[j]) { temp=numbers[i]; numbers[i]=numbers[j] number[j]=temp
What is the output if....
What is the output if....  Here is my code. what is the output...");   When we put 50 as a lower limit value, output comes: Entering... as a lower limit value, output comes: Entering the try block. Exiting the try block
Advertisements
what will the output
= (Parent) sonu; p.play(); What will be the output of above section of code...what will the output  class Parent has a public method play() that prints "Parent is playing". A class Child that extends the Parent class also has
what is the output?
what is the output?  public class MyAr{ public static void main(String argv[]) { int[] i=new int[5]; System.out.println(i[5]); } }   It gives ArrayIndexOutOfBoundsException as you haven't add element to array. Correct
what is given output?
what is given output?  public class { public static void main(string argv
c programming..what wil be the output of this program
c programming..what wil be the output of this program   #include int main() { int arr[] = {0,1,2,3,4}; int i,*ptr; for (ptr=arr+4; ptr= arr; ptr--) { printf("%d",*ptr
output
output  Sir,I am experiencing some problems with the output of this program.I got some useful help this website,but the output of the program isn't producing what it should.let me explain the output below is what happen when
What is the equivalent method in Java which is equivalent to clrscr() in c/c++ . The code should help to clear the output screen ?
What is the equivalent method in Java which is equivalent to clrscr() in c/c++ . The code should help to clear the output screen ?  Hello to all, I have searched the net to know that is there any equivalent method for clrscr
Output of flex
Output of flex  hi....... please provide the name of the output file. What is the output of flex applications? please rply ASAP........ Thanks
output error
output error  this is my program import java.io.*; public class...]; for (k=0;k } } if i enter "my name" as the input the output is only "my" what is the error.my actual out put should be"my name
triangle output
triangle output  program to get the following output
triangle output
triangle output  program to get the following output: * *   Hi Friend, Please specify the pattern properly. Thanks
output of the program
output of the program  public static int sum(List list) { int sum = 0; for ( Iterator iter = list.iterator(); iter.hasNext(); ) { int i = ((Integer)iter.next()).intValue(); sum += i; } return sum
xml output
xml output  generate an xml output in the following format <FileCount> <DOC>AA <RTF>BB <PDF>CC <Total>DD where AA=total number of .DOC files found BB=total number of .RTF files found,etc
input output
Input And Output       Introduction The Java I/O means Java Input/Output and is a part... used for writes byte to output stream. It implements a buffered output
JLabel for output
Java: JLabel for output Why using JLabel for output is usually bad... idea after the user interface is already displayed. For output JTextField is often a better choice. The use of JLabel for output is mentioned because some
output java - Java Beginners
; } a. what is the output of the ff. java statement:? i. System.out.println (secret...output java  public static int secret(int one) { int i; int...?  Hello Are you beginner? Ok, The first Output is 125
Error output - JSP-Servlet
Error output  Can anyone please assist me; The printed output should be: The product is 10. But instead of it I got; The product is undefined. Can anyone trace what went wrong of my code pls
how to get following output
how to get following output  input 123456 output 1 2 3 4 5 6
how to get following output
how to get following output  input 123456 output 1 2 3 4 5 6
Data input & output Stream
Data input & output Stream  Explain Data Input Stream and Data Output... stream in a machine-independent way. A data output stream lets an application write primitive Java data types to an output stream in a portable way
Formatted Output
Java NotesFormatted Output Java 5 implements formatted output with printf(). This concept will be very familiar to C and Fortran programmers. A good.... Taming Tiger: Formatted output Some simple examples format(). Amazingly
Output Encoding - JSP-Servlet
Output Encoding  From security vulnerability perspective, we?d like to perform output encoding of special characters (ex: < > ? ? % ; ( ) & +) on JSP while displaying pages.How can this be achieved ? Can we achieve
Input and Output package
Input and Output package  Hi guys, My professor used input and output... she used in.readint() out.writeln() commands to read input and print output. she created two new objects directly to use this statements. /* input and output
how to write code for this output?
how to write code for this output?   1 2 2 3 3 3 4 4 4 4 5 5 5 5 5
Object Output Stream
Object Output Stream  Can anyone decode the data from a file which is written by ObjectOutputStream?? I want to know if this is a secure way to write protected data without encryption
output using SQL
output using SQL  how to get ( 15 march 2011) and (15/03/2011) output using SQL   Use the following queries to get the data from database in the given format. For (15 march 2011) format: SELECT DATE_FORMAT(dob, '%d
Output of null value
(str); } } Output value Null Description:- In the given example
input output in java
input output in java  java program using filereader and filewriter   Hi Friend, Try the following code: import java.io.*; class FileInputStreamAndFileOutputStream { public static void main(String[] args) throws
output error - JSP-Servlet
output error  /*hi friends, the given below is my servlet program error? How can i solve this problem? */ HTTP Status 500 - -------------------------------------------------------------------------------- type Exception
Handling transformation output
Handling transformation output       Handling transformation output After passing xml and xsl sheets , we need to handle output ,after transformation
Input And Output
Input And Output       Introduction The Java I/O means Java Input/Output and is a part of java.io... for writes byte to output stream. It implements a buffered output stream
How to compile & get output for JSP
How to compile & get output for JSP  HI My Roseindia friend has given the answer as RUN the JSP How to run the JSP Program? But what i mean is that i... the said above one. So Kinly tell me the solution how to get the output
Input and Output problems - Java Beginners
Input and Output problems  1) what is Difference between InputStreamReader and FileReader? 2) what is buffer?   Hi friend, InputStreamReader: An InputStreamReader is a bridge from byte streams to character
unable to see the output of applet. - Applet
unable to see the output of applet.  Sir, I was going through... with my browser? please provide me with a solution .. i want to see the output... there is programme on that link.I exactly dont know what probleam u r facing
Output Previous or Next Day of the Month
Output Previous or Next Day of the Month   Please Help! I need... programs decide what to do depending upon the data by using... or previous day: The program should output the next day's or previous day's date
Creating custom output using XMLUnit - MatchTracker duplicates the output data
Creating custom output using XMLUnit - MatchTracker duplicates the output data  how to create a custom output using xmlunit, I have tried it and used... in input xml and I am having duplicate data in output
XSLT Output Types
; } Output Types The xsl:output element lets you specify how to generate result output. Although it is not required to specify the type of output but an XSLT... of the output element.  The xsl:output element is a top-level element
How to get Output for a Bean problem
How to get Output for a Bean problem  Hello Kindly tell me a simple Program on Bean to get the Output using JSP code
What is SPOOL?
What is SPOOL?  What is SPOOL?   SPOOL command stores output to a file
Java Redirect output to file
Java Redirect output to file This section illustrates you how to redirect the output to the file. It may be comfortable to a programmer if they are able... to the file. In the given example, we have set the output stream of System
printing the following output using for loop
printing the following output using for loop  1 2 3 3 4 5 4 5 6 7
printing the following output using for loop
printing the following output using for loop  1 2 3 3 4 5 4 5 6 7
servlets output to jsp - JSP-Servlet
servlets output to jsp  hey i have writing a code lately and wanted to print the output to the jsp page from the servlet.the servlet would read the command prompt n thn return the output as string to the jsp page here
save output in multiple text files
save output in multiple text files  Hi..I'm getting problem to store the output of this php code into multiple text files. Can anyone sugeest. Here... = $dom->getElementsByTagName('a'); foreach ($links as $link){ $output
STACK - WHY THE OUTPUT COMES LIKE THIS?
STACK - WHY THE OUTPUT COMES LIKE THIS?  //: holding/StackTest.java...(!stack.empty()) System.out.print(stack.pop() + " "); } } /* Output: fleas has dog My WHY THE OUTPUT COMES LIKE
Process Flows Output - Java Beginners
Process Flows Output  Hi, I have been asked to get a particular structure as the output. the assignment is as follows Any process flow has..... there might be a split activity sumwhere in the process, that splits the process flow
JSP output in Console - JSP-Servlet
JSP output in Console  Q:An input text should be read and the same should be printed in the CONSOLE. Actually i was able to do it in the browser... the output on console. Thanks
Output of this one - Java Interview Questions
Output of this one   public class Test { int i=-277; { try{ if(Byte i<<1) { System.out.println("Executed"); } else... errors. The following code displays "Executed" as an output. public class
Redirecting the output of an expression to a variable - JSP-Servlet
Redirecting the output of an expression to a variable  I want to redirect the output of to a variable defined in variable.jsp. What is the syntax...' file: Create another jsp file 'get.jsp' to get the output: Thanks
Advertisements
 

 

 

DMCA.com