Home Answers Viewqa Java-Beginners Hi Friend ..Doubt on Exceptions

 
 


SakthiPrabhu.g
Hi Friend ..Doubt on Exceptions
1 Answer(s)      4 years and 5 months ago
Posted in : Java Beginners

View Answers

December 30, 2008 at 4:00 AM


Hi friend,

Code for ArrayIndexOutOfboundsException :

class ArrayIndexBoundsOfException
{
public static void main(String[] args)
{
String strAr[] = new String[4];

strAr[0]="Ram1";
strAr[1]="Ram2";
strAr[2]="Ram3";
strAr[3]="Ram4";
strAr[4]="Ram5";
try
{
for(int i=0;i<5;i++)
{
System.out.println(strAr[i]);
}
}
catch (Exception e)
{
System.out.println(e.getMessage());
}

}
}

Thanks









Related Pages:
Hi Friend ..Doubt on Exceptions - Java Beginners
Hi Friend ..Doubt on Exceptions  Hi Friend... Can u please send some Example program for Exceptions.. I want program for ArrayIndexOutOfbounds OverFlow Exception.. Thanks... Sakthi  Hi friend, Code
Hi Friend.. Doubt on + - Java Beginners
Hi Friend.. Doubt on +   Hi friend... import java.io.*; class Plus { public static void main(String args[]) { int a=10; int b= 25... } }   Hi friend, The Java language provides special support
Hi Friend.. Doubt on + - Java Beginners
Hi Friend.. Doubt on +   Hi friend... import java.io.*; class Plus { public static void main(String args[]) { int a=10; int b= 25... } }   Hi friend, import java.io.*; class Plus{ public static
Hi Friend...Doubt on Uni Cast & Multi Cast - Java Beginners
Hi Friend...Doubt on Uni Cast & Multi Cast  Hi Friend.. Can u plz send some Details about the Uni CAst & Multi cast in JAVA...  Hi... once it's on the network Thanks  Hi friend, Unicast means
hi friend
hi friend   what is code for ``find no of days difference in the date of birth of two students using inner class in java
hi friend
hi friend   what is code for ``find no of days difference in the date of birth of two students using inner class in java
hi friend
hi friend   what is code for ``find no of days difference in the date of birth of two students using inner class in java
Hi ..doubt on DATE - Java Beginners
Hi ..doubt on DATE  Hi Friend...Thank u for ur valuable response.. IS IT POSSIBLE FOR US? I need to display the total Number od days by Each month... WAIT I WILL SHOW THE OUTPUT: --------------------------------- ENTER
Hi...doubt on Packages - Java Beginners
Hi...doubt on Packages  Does import.javax.mail.* is already Existing Package in java.. I have downloaded one program on Password Authentication... ..Explain me.  Hi friend, Package javax.mail The Java Mail API allows
Hi Friend... - Java Beginners
Hi Friend...  import java.util.*; // PACKAGES WHAT DOES IT MEAN ... --------------------------------------------------------- IpImage ip1... IS IT?   Hi friend, IpImage ip1=(IpImage)obj; // CREATION
hi Friend... - Java Beginners
hi Friend...  Hi friend... I have to import only " The System.out.println " Function Not any other Input Function ..How should i import... plz Explain this...Thank u.. Sakthi   Hi friend, Java IO
hi friend - Java Beginners
hi friend  ummm i want to know a java code ...what are the code if i want to display inverted pyramid(shape). i mean a pyramid is reversed down.... thank u friends!!!  Hi friend, Inverted pyramid code class
Hi Friend. on Default Data type Values - Java Beginners
Hi Friend. on Default Data type Values  Hi ... I have doubt on Default Data types... Is it Possible to print the Dafault Values..If it s so, Check...); } }   Hi friend, Code to solve the problem : import java.io.
Doubt
Doubt  Hi, Can any one help me out in step wise, how to get are charts using java in eclipse ide? thanks in advance   Download jar files jfreechart.jar and jcommon.jar files from the given link: Download JFreechart
Hi Friend..IS IT POSSIBLE? - Java Beginners
Hi Friend..IS IT POSSIBLE?  Hi Friend...Thank u for ur valuable response.. IS IT POSSIBLE FOR US? I need to display the total Number od days by Each month... WAIT I WILL SHOW THE OUTPUT
exceptions in java - Java Beginners
exceptions in java  can any one explain exceptions with example and how can i handle those plz explain me with examples.  Hi Friend... the normal flow of execution of a program. Exceptions are used for signaling
Exceptions in RMI - RMI
Hi friend,The server and client programs run with a security manager...Exceptions in RMI  During the execution of RMI program, the following exception is raised. Error.. java.rmi.ServerException : ServerRemoteException
Core Java Exceptions - Java Beginners
Error? How can u justify?  Hi friend, Read for more information...Core Java Exceptions  HI........ This is sridhar .. Exceptions r checked exception and unchecked exception ........? Checked exceptions r
EXCEPTIONS - Java Interview Questions
EXCEPTIONS  Hi, How To Handle The Exception With Out Using Try and Catch Block i want answer?plz help meeeeeeee  Hi Friend, You can use throws clause.For ex: class MyException extends Exception { public
Exceptions - Java Beginners
Exceptions  Write a program that prompts the user to enter a series of integers from the command line (-1 to stop). Use Java's Exception handling to ignore invalid input. Thank You  Hi Friend, Try the following
"Doubt on Swing" - Java Beginners
"Doubt on Swing"  Hi Friend.... Thanks for ur goog Response.. i need to create a GUI Like... pic1.gif RadioButton pic2.gif... button..it should link to d sql.. how oes it possible friend.. Thanks
Doubt in struts - Struts
with code?  Hi friend, Please visit the link to solve the problem...Doubt in struts  I am new to Struts, Can anybody say how to retrieve data from database and display it in jsp. Some said to use beans but i dont
doubt in combobox in flex - XML
doubt in combobox in flex  hi, i have doudt in combobox... it would be really helpful to me .pls provide the codings in mxml.  Hi friend, You can use selectedItem property or currentTarget property for getting
Doubt in servlets - JSP-Servlet
Doubt in servlets  Good Evening sir/madam, I want to add data dynamically for that which methods i have to use to retrieve the dynamic data .  Hi Friend, Try the following code: 1
Hi..Again Doubt .. - Java Beginners
Hi..Again Doubt ..  Thank u for ur Very Good Response...Really great.. i have completed that.. If i click the RadioButton,,ActionListenr should get... WORRY WE'ILL ROCK "); } } }   Hi Can u send your MainMenu.java
doubt in ejb3 - EJB
doubt in ejb3  hi i am new to ejb3 .i have written simple code which...) at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:944)   Hi Friend, Plea
Hi..
Hi..  null is a keyword.True/False?   hi friend, In Java true, false and null are not a Java keyword they are literals in Java. For reading in detail go through the following link The null keyword
Hi
Hi   how to read collection obj from jsp to servlet and from jsp - jsp?   Hi Friend, Please visit the following link: http://www.roseindia.net/jsp/servlet-jsp-data-list.shtml Thanks
JSP basic doubt
.   Hi Friend, Either you can do the following : 1)login.jsp: <...;/form> </html>   Hi Friend, How to get the message in login.jsp
Login validation doubt
above thing.   Hi Friend, Try the following code: 1)login.jsp: <...Login validation doubt  Hi, 1)login.jsp: <%@page import="java.sql.*"%> Username: Password: 2)check.jsp: <% String user
doubt - Java Beginners
doubt  is it possible to get the data from applet window for inserting into database using JDBC?i did this ,but it displays access denied..   Hi friend, import java.awt.Font; import java.awt.Color; import
hi
hi  int A[]=new int{2,5,4,1,3}; what is the error in declaration of this   Hi Friend, This is the wrong way of declaring an array. Array is always declared in the following ways: 1)int arr[]=new int[5]; 2)int arr
hi
hi  what is the code for printing stars as follows * * * * * * * * * *print("code sample");   Hi Friend, Try this: public class PatternExample { public static void main(String[] args) { int
hi.......
for such a programme... plz help me...   Hi Friend, Try this: import java.awt....hi.......  i've a project on railway reservation... i need to connect netbeans and mysql with the help of jdbc driver... then i need to design
Doubt on Data Types - Java Beginners
Doubt on Data Types  Hi Friend doubt on DataTypes... How should i declare n Assign value to the Float variable; Can u Please COMPILE this Program...Explain in detail
I have a doubt regarding action - Struts
I have a doubt regarding action   hi, I have doubt regarding struts,I got response through jsp and once again it redirecting to action. If anybody knows pls respond me. with regards, Teju  Hi friend
servlet doubt - Servlet Interview Questions
servlet doubt  How do I read and output a text file from a Servlet? How can I invoke a servlet from JavaScript?  Hi Friend, Invoke servlet from javascript: 1) create jsp file and put the following code
Validation doubt
Validation doubt  hi..... thanks for the other validation code. I have got that and implemented in my code but i have a doubt in that. As we try... think i am able to tell u what i want to and u have got whats my doubt. plz give
java doubt
about the exceptions thrown by some methods so it insists us to handle them. We
doubt in my program code - Java Beginners
. FAYAZ.  Hi friend, Please specify your requirements in detail...doubt in my program code  i have developed a web browser with the help of standard widget toolkit(swt) and java. i creted some buttons such as GO
big doubt
database contains a message of time  hi i have one doubt.if the database contains a message of time 05:00 to 06:00 the same msg should be displayed as marquee in the bottom of the page.below is the example if the data base
exceptions
exceptions  why we get compiletime exceptions(checkedExeption)? forEg:IOException,servletException
doubt regarding JSF
doubt regarding JSF  Hi, pls explain what is difference between struts &JSF? pls explain what is difference between SPRING &JSF
Exceptions - JSP-Servlet
...........!   Hi Jagadish Read the Range of Char, long,int,short...;Hi , String code=request.getParameter("empid"); int EmpID
doubt this
doubt this  what is the use of "this" and "super" keyword
Doubt Regarding Charts
Doubt Regarding Charts  Hi, Can you please help me out by answering "hoe to include charts in core java code and struts code" thanks in advance, Swaroop Eswara   Please visit the following link: Jfreechart
DOUBT ?
DOUBT ?  in c++ member function of a class must be public
Doubt regarding charts and jsp
Doubt regarding charts and jsp  Hi in the http://www.roseindia.net/chartgraphs/barchart-jsppage.shtml of the code (new StandardEntityCollection()); final File file1 = new File("../webapps/jspchart/web/barchart.png
Doubt on Segmentation - Java Beginners
Doubt on Segmentation  Hi .. ImageProcessing.. How to segment the each and every characters from the bitmap image Consider for an example bitmap1.bmp: Visuallc++ text is on bitmap1.bmp..How to extract those from image
Doubt regarding charts and jsp
Doubt regarding charts and jsp  Hi, I successfully executed the bar chart in normal java application. But I want the Bar Chart to be executed in web application(jsp). So,please help me out in how to connect the normal

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.