Skip to Main Content
Java
book

Java

by Michael Sikora
January 2003
Beginner to intermediate content levelBeginner to intermediate
150 pages
7h 28m
English
Morgan Kaufmann
Content preview from Java
Java provides an exception-handling mechanism that helps you build robust code. When
an error occurs at runtime, an exception is thrown. It is possible for an application to catch
this exception and, in many cases, recover from it.
6.1 Exception Handling
The Multiply class, which we have seen in Chapter 1, multiplies two integers supplied as
arguments and outputs the result.
Multiply
1 public class Multiply {
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
}
public static void main(String[] args) {
String resultString;
int argl;
int arg2;
int result;
argl = Integer.parselnt(args[0]);
arg2 = Integer.parselnt(args[l]); ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java Programming

Java Programming

Poornachandra Sarang
JAVA Programming

JAVA Programming

K. Rajkumar
Java Programming

Java Programming

Hari Mohan Pandey
Java 9 for Programmers

Java 9 for Programmers

Paul J. Deitel, Harvey Deitel

Publisher Resources

ISBN: 9781558609099