013-002-004
Integer Class: String to Number Conversion
Easy
Problem Description
Integer class: String to Number Conversion
In this problem, you will create a program that converts two numeric strings to integers using Integer.parseInt, calculates their sum and product, and displays the results to standard output.
Learning Objective: Convert string to number with Integer.parseInt
Create program converting numeric strings to integers for calculation. Convert string "123" to integer 123 with Integer.parseInt.
Input
Line 1: Numeric string 1 (String)
Line 2: Numeric string 2 (String)
Output
Sum: [sum]
Product: [product]
```java
## Examples
### Example 1: Basic values
Input:
```java
10
20
```java
Output:
```java
Sum: 30
Product: 200
```java
### Example 2: Different values
Input:
```java
5
8
```java
Output:
```java
Sum: 13
Product: 40
```java
### Example 3: Boundary values
Input:
```java
1
1
```java
Output:
```java
Sum: 2
Product: 1
Ready to Try Running Code?
Log in to access the code editor and execute your solutions for this problem.
Don't have an account?
Sign Up