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
Since the size of cache is always smaller than the size of the main memory, the sum of bits of the offset and index of a cache w
dlinn [17]

because cache memory is costlier than main memory and physical size of cache memory also matters.ignoring the cost , if we use large cache memory, it will take larger physical space.so mother board won't be able to accomodate it

6 0
2 years ago
Wrtie down some containerization technology.
Rina8888 [55]

Answer:

Some containerization technologies are listed as follows: Docker, Docker Enterprise, Amazon Elastic Container Service, Container Linux, Amazon's AWS, Microsoft's Azure Container, etc.

Explanation:

Containerization technology is a computer technology that packages software codes and their dependencies in isolated user spaces called containers so that the software can run uniformly and consistently on any infrastructure, using a shared operating system.  It is the modern alternative and companion to virtualization.  In simple terms, containerization is the process which packages an application with the required libraries, frameworks, and configuration files so that it can efficiently run in various computing environments.

5 0
3 years ago
Connected contacts require___ to open.
wariber [46]
Manual power





hope it helps you
6 0
3 years ago
You have recently installed Windows Server 2019 Desktop Experience on a server. Your manager informs you that he needs to extens
Korolek [52]

To meet the manager requirement, you need to format the server, then after that install Server Core. This process is now followed by rebooting the server in the Server Core mode.

<h3>How do you install a Windows server?</h3>

Whenever you want to install Windows Server by using setup wizard settings, you have the choice of installing Server Core or Server with a graphical user interface known as the Desktop Experience installation method.

Since the GUI is not usually installed with Server Core; you control the server via the command line by using:

  • PowerShell,
  • The Server Configuration tool (SConfig), or
  • Remote methods. 

Now, if your manager informs you that he needs to extensively use the command line and PowerShell but not the use of graphical interface, the best way to meet the requirements are:

  • Format the server and install server core
  • Reboot the server in the Server Core mode

Learn more about Windows server installation here:

brainly.com/question/26175904

5 0
3 years ago
If you ping a device, you are using the______protocol
meriva
Joystick..................:-)
6 0
3 years ago
Other questions:
  • Write the definition of a method named printPowerOfTwoStars that receives a non-negative integer n and prints a string consistin
    10·1 answer
  • What is daemontools pakage in qmail?
    14·1 answer
  • Shakespeare’s complete works have approximately 3.5 million characters. Which is bigger in file size: Shakespeare’s complete wor
    5·2 answers
  • Yahoo and Google are examples of __________ used to perform Internet research.
    14·2 answers
  • In what stage of an algae or fungi life cycle are they able to reproduce spores?
    10·1 answer
  • You are required to copy in your attendees' emails from outside of Outlook when creating a meeting
    6·2 answers
  • Shelby wants to move “ExpirationDate” to the top of the datasheet. What should she do?
    13·1 answer
  • Stephanie would like to know the average number of regular hours worked by her employees. In cell B11, create a formula using th
    8·1 answer
  • Wanna song to vibe to? Listen to Streets by Doja cat
    11·1 answer
  • With which type of test question should you leave yourself extra time to answer?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!