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
11111nata11111 [884]
4 years ago
7

In a java class, variables can be present both inside and outside of methods. question 9 options:

Computers and Technology
1 answer:
Tems11 [23]4 years ago
3 0
The correct answer is: True

Explanation:

Consider the following program:
<span>class Main {
int a = 10;
public static void main(String[] args) {
add();
}

private static void add() {
int b = a+20;
System.out.println(b);
}<span>
}


The output of the above program is 30. As you can see the variable a is declared outside the method, whereas variable b is declared inside the method.</span></span>
You might be interested in
Write a C program (doublecopy) that allows a user to extract some part of an existing file (fileSource) and copy it twice to a n
Slav-nsk [51]

Answer:

Check the explanation

Explanation:

#include <stdio.h>

#include <sys/stat.h>

#include <stdlib.h>

#include <fcntl.h>

#include <errno.h>

#include <unistd.h>

extern int errno;

struct stat st;

int main(int argc, char **argv){

  int num1 = atoi(argv[1]); // Getting num1 from user

  int num2 = atoi(argv[2]); // Getting num2 from user

  char *fileSource = argv[3];

  char *fileTarget = argv[4];

 

  int source_fd = open(fileSource, O_RDONLY); // opening the file in read only mode

  int target_fd = open(fileTarget, O_WRONLY | O_CREAT); // opening the target file in Writeonly mode if file is not found it will create

   

  char *ch = (char *) calloc(num2+num1, sizeof(char));

 

  stat(fileSource, &st);

  if(st.st_size < (num1 + num2)){

      printf("File Size is smaller than the specified bytes\n");

      read(source_fd, ch, st.st_size); // reading the file upto the end

      write(target_fd, ch, st.st_size); // write to the file

      write(target_fd, ch, st.st_size); // two times writing to the file

  }else{

      if(lseek(source_fd, (off_t)num1, SEEK_SET) < 0 ) // moving the cursor to after the specified bytes from the start

      {

          printf("Some Error occured while seeking the file");

          return -1;

      }

      read(source_fd, ch, num2); // reading num2 bytes from the source

      write(target_fd, ch, num2); // writing two times to the target

      write(target_fd, ch, num2);

     

  }

 

  return 0;

 

}

1 2 #include <stdio.h> #include <sys/stat.h> #include <stdlib.h> #include <fcntl.h> #include <errno.h> #include <unistd.h> 4

The code screenshot and code output are attached below.

3 0
3 years ago
Because HTML was designed as a cross-platform language, it is the preferred method of communicating with back-end databases. Tru
zubka84 [21]

Answer:

False

Explanation:

HTML which stands for Hypertext Markup Language is a front-end formatting language, that is why it is referred to as a markup language. It handles everything you want to be displayed on the webpage such as images, videos, text including their arrangements.

It should be noted that HTML is not a programming language. The back-end contains all that is developed on the server side. Usually programming languages like PHP, NodeJS, Ruby, C# and many more.

These programming languages communicate with back-end databases while HTML formats the result to be displayed on the web page.

6 0
4 years ago
How do you change colors for presentation to blue warm in power point?
Furkat [3]

In PowerPoint presentations you can change background color. The best way to do this is to change the template background color in the master view. This will let you use the same background color among the whole presentation and also for the new slides that you will create.

In order to change the background color in Microsoft PowerPoint 2010 we need to go to View and Slide Master. Then, right click on the first slide and click Format Background.

5 0
3 years ago
To permit electrical energy to be sent over long distances at high voltage, then reduced to a lower voltage for everyday use, wh
AVprozaik [17]
High-voltage direct current
7 0
3 years ago
Read 2 more answers
Running fewer applications at once is a way to resolve which type of bottleneck?
vichka [17]
The answer is <span>memory.  </span>Running fewer applications at once is a way to resolve the bottleneck in <span>memory.  </span>Run fewer programs at the same time and restarting a PC regularly, is a good way to clear out its memory.
6 0
3 years ago
Other questions:
  • What should you do when an error message pops up on the screen?
    7·2 answers
  • How can a user begin working with a new, blank workbook in Excel?
    10·1 answer
  • An electronic device that can accept data as input, process it according to a program, store it, and produce information as outp
    6·1 answer
  • Which of the following statements is correct? Group of answer choices An object of type Employee can call the setProjectName met
    11·1 answer
  • Describe the facility that allows multiple types of operating systems to run in a virtualized environment with varying types of
    15·1 answer
  • Write down a scratch program which:
    5·1 answer
  • Using the simple alphabet code below, you will decode and encode the message. Write the Full
    6·1 answer
  • Nick is moving from Alabama to Texas. A friend of his remarked that Nick may have to pay higher taxes there. What is the cheapes
    7·1 answer
  • After reading through the code, what will happen when you click run?​
    13·1 answer
  • Why is it better for a CPU to have more than one cache?
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!