Computer Applications
Write a code that creates a Scanner object and sets its delimiter to the dollar sign.
Related Questions
Write a program in Java that takes input using the Scanner class to calculate the Simple Interest and the Compound Interest with the given values:
i. Principle Amount = Rs.1,00,000
ii. Rate = 11.5%
iii. Time = 5 years
Display the following output:
i. Simple interest
ii. Compound interest
iii. Absolute value of the difference between the simple and compound interest.
Write a line of code that:
i. Creates a Scanner object named scanner to be used for taking keyboard input.
ii. Uses the object scanner to read a word from the keyboard and store it in the String variable named stg.
Consider the following input:
one, two three, four, fiveWhat values will the following code assign to the variables input1 and input2?
String input1 = keyboard.next();
String input2 = keyboard.next();Write a statement to let the user enter an integer or a double value from the keyboard.