Question
Variables and Constants L1 Code to prove you understand how the following Window methods should be used: clearOut readIn writeOut writeOutLine , Test your code.
Variables and Constants L1 Code to prove you understand how the following Window methods should be used: clearOut readIn writeOut writeOutLine , Test your code. Your code should test the methods properly e.g. there is no point in using clearOut if the out text area is already cleared or using writeOutLine if nothing follows it to prove a line has been thrown.
L2 Code to display the numbers 7, 8 and 9 each on its own output line. Add them up in code and display their sum on yet another line. Do this 3 ways: Without using variables at all Using 3 independent variables (one for each number) and another variable for their sum Reusing just one variable for the numbers and one additional variable for their sum Data Types
L3) Code declaration statements (including the assignment of an initial value) for the values discussed in T5 Write code to display the value of each of the above together with a suitable description (e.g. Number of Floors: 27).
L4 . Declare variables with data type int, double, String and boolean and give all of them an initial value of the appropriate type. Give the String variable an initial value of 123. Now try to assign the value of each to the other three variables. You will have to comment out assignment statements that cause an error. Which conversions does Java perform automatically? Which conversions will Java perform with a cast? What are the side effects of these cast(s)?
Use JAVA language and Window class.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started