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
blsea [12.9K]
3 years ago
15

2. Suppose you want to write a method that prints a heading on a new output page, along with a page number that is 1 in the firs

t activation and that increases by 1 with each subsequent activation. Can this be done without parameters and without reference to nonlocal variables in Java
Computers and Technology
1 answer:
Ilia_Sergeevich [38]3 years ago
7 0

Answer:

This can be done in both Java and C#, using a static (or class) data member for the page number.

Explanation:

You might be interested in
Create a class called Jack that extends Leo. This class must have the following behaviors/methods. You must use the inheritance
lara [203]

Answer:

public class Leo{

public String method1(){

return "Jack 1 Leo 1";

}

public String method2(){

return "Don 2 Jack 2";

}

public String method3(){

return "Jack 3 Leo 3 Don 2";

}

public String toString(){

return "Jack 3 Leo 1"

}

}

public class Jack extends Leo{

}

Explanation:

Leo is the parent class and jack inherits all of its attributes from Leo

So when you call the following code in the main method:

Jack j = new Jack();

System.out.println(j.method1);

it should print Jack 1 Leo 1

This is because the program first checks if method 1 exists in the Jack class

Because it doesn't exist it then goes to the parent class which is Leo.

And in the Leo class method1 displays "Jack 1 Leo 1 "

So it prints that

8 0
3 years ago
Between which zones and a DMZ should firewalls be placed? Choose two answers.
brilliants [131]

Answer:

Internal and External Zones

Explanation:

Demilitarized Zone (DMZ) in a network means that, we make sure the security of network at higher level as military make sure the security of their bases or zones.

In this type of network, The network of the internal organization (LAN) needs security from hackers and unauthorized users who are trying to access the resources and information from the network.

This network is divided into two major zones. A DMZ has been placed between two zones along with firewalls enhance the security of LAN Network from the networks on internet. These two zones are named as Internal and External Zone. The firewall between DMZ and External zones monitors the users from external networks on the internet who tries to access organization's network. Internal network monitors the traffic between DMZ and Internal LAN network.

4 0
3 years ago
The unique identification number assigned to your computer when you connect to the internet is known by all of the following, ex
Eddi Din [679]
<span>The unique identification number assigned to your computer when you connect to the internet is known by </span><span>dotted quad, dotted decimal, IP address except  </span>dotted period.  
3 0
3 years ago
Read 2 more answers
The content of a 4-bit register is initially the 4-bit word 0101. the register is shifted 6 times to the right with the serial i
Slav-nsk [51]

what is this concept?

3 0
3 years ago
11. The golden rule of safe driving is: A. Always drive at the posted speed limit B. Never drive while physically or mentally im
Nonamiya [84]

Your correct answer is A. Always drive at the posted speed limit.

While B. and C. are logically also correct, I wouldn't call them the "golden" rules. Following A. can help you avoid B. to make matters better, hehe.

3 0
3 years ago
Other questions:
  • How to connect to my wireless printer for dummies?
    12·1 answer
  • What guidelines should you follow when adding graphics to your presentations?
    14·2 answers
  • What type of device can be used to block unwanted traffic initiated from the internet and can also restrict internet access from
    6·1 answer
  • Typically, when an organization purchases Internet access from an Internet Service Provider (ISP), the ISP will grant it
    10·1 answer
  • Can a computer will work more efficiently if you perform disk optimization
    9·1 answer
  • Which of the operating systems listed below was the last to be released
    8·1 answer
  • What is one requirement for achieving Continuous Deployment
    15·2 answers
  • Analyze the error in the html code :<br><br> HTML
    9·1 answer
  • What does a computer use long-term memory, or ROM, for?
    13·1 answer
  • Mario is designing a page layout for a sports magazine, and he decides to add the image of a cyclist. Which principle of page la
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!