PDA

View Full Version : java programming


kamali
02-16-2007, 10:19 PM
What is java exception ? please give me a simple example.

:yes: :cool: :cool:

Anusha
02-16-2007, 10:29 PM
Exceptions are mostly runtime errors.
Eg: You can convert String str = "55" to int by using

int x = Integer.parseInt(str);

but if str = "a", you can't convert it to an integer. Then it will give an exception called NumberFormatException

:)

Sampath17
02-17-2007, 12:43 PM
Thanx 4 the information u sent.

bye tc:)

racool
02-17-2007, 02:00 PM
can u post some mor info abt java programin

Anusha
02-17-2007, 02:06 PM
can u post some mor info abt java programin
Just grab an ebook and read it.

lasanka
02-17-2007, 02:19 PM
ahh ya e books... but theyre a lil annoyin to read on the comp ne?

Kasunm
02-17-2007, 03:01 PM
ebooks eh can't say that i'm a big fan of them i prefer the good ol paper back indian books

lasanka
02-17-2007, 03:03 PM
precisely the paperbacks are gud...
indian ones are like the low cost editions ryt??

Kasunm
02-17-2007, 03:08 PM
precisly my dear watson they're the low cost ones

kamali
02-18-2007, 04:32 PM
Exceptions are mostly runtime errors.
Eg: You can convert String str = "55" to int by using

int x = Integer.parseInt(str);

but if str = "a", you can't convert it to an integer. Then it will give an exception called NumberFormatException

:)

Thanx :) :yes: :yes: :yes: :yes:

sri_lion
02-18-2007, 04:45 PM
What is java exception ? please give me a simple example.

:yes: :cool: :cool:

Exceptions are situations that's normally occurs when executing certain logics that are not normal or typical.

For example:

In Programming any number divided by 0 would be infinity,
(if you are familliar with C programming you would recall that if you try dividing numbers by 0 the program runs forever! else you can try this in your windows calculator where it will give you a "cannot calculate" message)

but in Java it doesn't happen.. instead it recognize the situation and "catch it" these kind of situations are called an exceptions!! And that "catching" is called Exception Handling!!

kamali
02-18-2007, 08:46 PM
Exceptions are situations that's normally occurs when executing certain logics that are not normal or typical.

For example:

In Programming any number divided by 0 would be infinity,
(if you are familliar with C programming you would recall that if you try dividing numbers by 0 the program runs forever! else you can try this in your windows calculator where it will give you a "cannot calculate" message)

but in Java it doesn't happen.. instead it recognize the situation and "catch it" these kind of situations are called an exceptions!! And that "catching" is called Exception Handling!!

Wow ur a good teacher. I got a clear picture about exception. :yes: :lol: :lol:
Thank u very much.

prasadana2
02-18-2007, 08:56 PM
m... its programming..

sri_lion
02-19-2007, 12:30 AM
Wow ur a good teacher. I got a clear picture about exception. :yes: :lol: :lol:
Thank u very much.

I'm glad you understood!!:)

lasanka
02-19-2007, 02:33 AM
I'm glad you understood!!:)
tnx dude!

Anusha
02-19-2007, 07:08 AM
m... its programming..
Yeah, not the thing for you I suppose :)