Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

undefined 1- Declaring, instantiating, and using local variables In Java, to declare a local variable (what is a local variable?), you write the data type

image text in transcribedundefined

1- Declaring, instantiating, and using local variables In Java, to declare a local variable (what is a local variable?), you write the data type and then the name of the variable and then you type a semicolon to finish the statement like this: int number; Here you declared a variable of type integer and named it number" ---But wait! Where do I write this?! Put your declaration line int number;" inside your main method "public static void main(String[] args)" instantiating your variables would follow the syntax in the following example: int number=5; Declare a double variable, call it mydouble and give it the value 2.5 and then print it. Remember: You can always apply mathematical operations in java (addition, subtraction multiplication and division, mod, ++,-, etc)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Watson Watson

5th Edition

0471715360, 978-0471715368

More Books

Students also viewed these Databases questions

Question

3. Explain how to conduct an appraisal feedback interview.

Answered: 1 week ago