Answer:
- import java.util.Scanner;
- public class TryToParseDouble {
-
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
- double num;
-
- try{
- System.out.print("Input a number: ");
- num = Double.parseDouble(input.nextLine());
-
- }catch(NumberFormatException e){
- num = 0;
- System.out.println("Invalid input! It should be a number in double type");
- }
- System.out.println(num);
- }
- }
Explanation:
Firstly, create a Scanner object to get user input (Line 5).
Next, create a try block and prompt user to input a number and use Double.parseDouble() method to convert the input to double type in the block (Line 8-10).
Next, create a catch block to catch a NumberFormatException. In the Catch block, set the num to zero and then print out a message to inform user about the invalid input (Line 12-14).
Lastly, display the number (Line 16).
Answer:
Changeable™ Color Change Markers
Explanation:
Theyre really good, ive bought some
Answer:
surface temp of fuel rod = 678.85 K
Explanation:
Given data :
D1 = 25 mm
D2 = 50 mm
T2 = 335 k
T∞ = 300 k
hconv = 0.15 w/m^2.k
ε2 = 0.05
ε1 = 1
Determine energy at Q23
Q23 = Qconv + Qrad
attached below is the detailed solution
Insert given values into equation 1 attached below to obtain the surface temperature of the fuel rod ( T1 )