1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
wariber [46]
3 years ago
7

2-Write test programs in java to determine the scope of a variable declared in a for statement. Specifically, the code must dete

rmine whether such a variable is visible after the body of the for statement

Computers and Technology
1 answer:
ankoles [38]3 years ago
7 0

Answer:

See Explaination

Explanation:

public class testscope

{

//start of main function

public static void main(String[] args)

{

//varible declration

int i;

int x;

//loop for 10 times

for(i=0; i<10; i++)

{

//initialize value of x to 10

x = 10;

}

//the scope of variable x is visible outside of for loop

System.out.println("The value of x is: "+x);

}

}

See attachment for sample output

nb:

You can clearly see in the output of Java program the value of x is not printed and program return errors. It means the variable x declared inside for loop does not has scope outside the for loop.

You might be interested in
Computer engineering is a career that......
WITCHER [35]

Answer:

Computer engineering is a career that works on the development and research of new technology-related things.

Explanation:

4 0
3 years ago
What is one benefit of Powerpoint Online?
VashaNatasha [74]

Answer:

for edge users

anyone with the url

Explanation:

6 0
3 years ago
Read 2 more answers
The dome of Hagia Sophia rests on these curving, triangular features of Byzantine architecture called __________.
kipiarov [429]

Answer:

pendentives

Explanation:

4 0
3 years ago
8.1 edhesive answer please
Gnoma [55]

Answer:

dont understand what u mean

4 0
3 years ago
A firm has a huge amount of individual customer data saved in different databases. Which of the following can be used to integra
Rama09 [41]

Answer:

C. CMR systems

Explanation:

CMR or customer relationship management is a strategy that uses data analysis of customers to manage the interaction between a company and current and potential customers.

It analyses the data of client from different channels like wesites, email, social media,telephone log etc, describing and predicting potential decisions to be made to enhance customer service and acquisition.

6 0
3 years ago
Other questions:
  • At a local burger chain, a customer became extremely angry. Everyone took notice at the person, who was yelling at anyone he cou
    10·2 answers
  • What is the purpose of a title slide on power point
    14·2 answers
  • Briefly explain the following terms and concepts:
    8·2 answers
  • Who is responsible for customer service?
    14·1 answer
  • Ok so another weird question! So if you know what google drive is and how to upload a video why does it keep adding hours! it ke
    11·1 answer
  • A chef writing up her famed recipe for beef stew realizes she has switched parsley and oregano everywhere in the recipe. The che
    13·1 answer
  • Which component is a part of the CPU of a computer
    12·2 answers
  • Before going into space, astronauts spend many hours training on flight simulators allowing them to learn how to fly without lif
    10·1 answer
  • Explain the impacts of computer in education
    6·2 answers
  • PLEASE ANSWER AND HURRY I'LL MARK YOU BRAINLIEST!!<br><br><br>​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!