TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Java - ArrayIndexOutofBoundsException Program
Senthilvelan Sambamoorthy
Aug 20
2016
Code
1.1
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
ArrayEx.rar
// ArrayIndexOutOfBoundsException
class
ArrayEx
{
public
static
void
main(String args[])
{
try
{
int
a[]=
new
int
[
10
];
//Array has only 10
elements
a[
11
] =
9
;
}
catch
(ArrayIndexOutOfBoundsException e)
{
System.out.println
(
"\nArrayIndexOutOfBoundsException : out of array size"
);
}
}
}
Java
ArrayIndexOutofBoundsException Program