Which is the instance variable in the given code?

public class Person{

public intpid;

private double salary;

public Person (intpersonID){
pid = personID;
}

public void setSalary(double empSal){
salary = empSal;
}

public void printDetails(){
System.out.println("id : " + pid );
System.out.println("salary :" + salary);
}

public static void main(String args[]){
Person P = new Person("P1");
P.setSalary(100);
P.printDetails();
}
}


A. public intpid;
B. private double salary;
C. intpersonID
D. double empSal
E. Person P = new Person("P1");

Which Is The Instance Variable In The Given Code?public Class Person{public Intpid;private Double Salary;

Answers

Answer 1

Answer:

Person P is a new instance of Persons class

-- located in the main class


Related Questions

Which are benefits of group discussions? Check all that apply. Learning becomes more interesting. Students engage in learning. Learning involves less work. Less preparation is required. Preparation is encouraged.

Answers

Answer:

1st and 3rd one

Explanation:

because it's right

Answer:

im preety sure its the first, 2nd and 4th one but im not completely sure

Explanation:

2) - How many integers between 1 and 500 inclusive are divisible by either 2, 3, or 5?

Answers

366 numbers between 1 and 500 are divisible by 2, 3, or 5.

We can check this with the following code:

What should you do if you do not understand the directions on a test?

Answers

Answer:

ask your teacher for a little guidence.

Explanation:

even though you may not get the answer you need they might give you some assitance

JPG is considered a lossy file format. What does this mean?
O JPG files are insecure.
O JPG files compress efficiently but have compromised quality.
O JPG files are easy to delete.
O JPG file compression can be reversed.
PLEASE HELPPPPP!!!!!

Answers

Answer:

either a or b

Explanation:

Answer:

A it files are insecure

Explanation:

Write a Java program called Decision that includes a while loop to prompt the user to enter 5 marks using the
JOptionPane statement and a System.out statement to output a message inside the loop highlighting a pass
mark >= 50 and <= 100. Any other mark will output a messaging stating it’s a fail.
Example of the expected output is as follows:
55 is a pass
12 is a fail

Answers

Answer:

Written in Java

import javax.swing.JOptionPane;

public class Decision{

public static void main(String[] args) {

    int i = 1;

    while(i<=5){

    String score = JOptionPane.showInputDialog("Input <score>");

    int mark = Integer.parseInt(firstNumber);

    if(mark >= 50 && mark <= 100) {

        JOptionPane.showMessageDialog(null, mark, " is a pass", JOptionPane.PLAIN_MESSAGE);

    }

    else{

        JOptionPane.showMessageDialog(null, mark, " is a fail", JOptionPane.PLAIN_MESSAGE);

    }

    i++;

    }

}

}

Explanation:

This initializes the a counter variable i to 1

    int i = 1;

The following iteration is repeated as long as i is less than or equal to 5

    while(i<=5){

This prompts user for input

    String score = JOptionPane.showInputDialog("Input <score>");

This converts user input to integer

    int mark = Integer.parseInt(firstNumber);

This checks if input is within 50 and 100 (inclusive)

    if(mark >= 50 && mark <= 100) {

This prints pass

        JOptionPane.showMessageDialog(null, mark, " is a pass", JOptionPane.PLAIN_MESSAGE);

    }

If otherwise

    else{

This prints fail

        JOptionPane.showMessageDialog(null, mark, " is a fail", JOptionPane.PLAIN_MESSAGE);

    }

This increments the counter variable by 1

    i++;

    }

Matt creates a Java class as part of his college assignment. He wants this class to be accessible within the current package only. Which access specifier should Matt use?

Matt has another Java assignment with multiple classes. In this assignment, there is a general class. A few subclasses outside the package use methods from this general class. Which access specifier should Matt use for the general class?

Matt should use the (blank) access specifier for the first class.

A. Protected
B. Default
C. Private
D. Public

He should use the (blank) access specifier for the general class.

A. Protected
B. Public
C. Default
D. Private

Answers

Answer:

first use Default as

a class with the default access modifier in a package, only those classes that are in this package can access this class. No other class outside this package can access this class.

general uses protected to make itself accecible to the subclasses.

Which of the following indicates branching of the program flow based on a condition?

input/output symbol
flow line symbol
decision symbol
process symbol
______________________________________________________________
Which of the following symbols depicts one distinct action in a program?

decision symbol
process symbol
input/output symbol
predefined process symbol

Answers

Answer:

Which of the following indicates branching of the program flow based on a condition? decision symbol

Which of the following symbols depicts one distinct action in a program? process symbol

Explanation:

Flow chart is the graphical representation of a process or algorithm.

Which of the following indicates branching of the program flow based on a condition?

The condition has two options to be processed based on its result hence the program is divided into branches after the decision of process.

The decision symbol is used for this purpose.

Which of the following symbols depicts one distinct action in a program?

The distinct action only involves one action. Out of the given options, process symbol is used for distinct action.

Hence,

Which of the following indicates branching of the program flow based on a condition? decision symbol

Which of the following symbols depicts one distinct action in a program? process symbol

Guess The Song:
What Popping Brand New Whip Just Hopped In, I Got options

Answers

WHATS POPPIN

Song by Jack Harlow

How can you tell that your worksheet is in Macro Recording mode?
A) A gray box is next to the word Ready in the bottom left corner.
B) The word Record is next to Ready in the bottom left corner.
C) The word Ready is in the bottom left corner.
D) A red light flashes next to the word Ready in the bottom left corner.

Answers

Answer:

A

A gray box is next to the word ready in the bottom left corner

Explanation:

A gray box is next to the word Ready in the bottom left corner can you tell that your worksheet is in Macro Recording mode. Thus, option (a) is correct.

What is recording?

The term recording refers to record the data on the worksheet as well as the recording on the mic. The recording was the recording was the necessary to maintain. The recording was the accounts and the audio was the also as the record in the terms. The recording was the voice modulation of the recorder.

A worksheet was the important term in the recording of the data. The recording in the workbook are the easy to find and the properly managed. The recording was the necessary to maintain the data. The gray color box and the search, the next is the ready button of the left in the corner.

Therefore, option (a) is correct.

Learn more about on recording, here:

https://brainly.com/question/10677268

#SPJ2

Fill in the blanks: The ____is useful when the most common value of a data set is required. A.mean B.median C.mode

Answers

Answer:

C.Mode

Explanation:

The mode is useful when the most common value of a data set is required.

mode. an easy way to remember is MO from mode can stand for most often

Which of the following trims would be used at the beginning of a scene?
A)Utilized sound
B)Post trim
C)Tail trim
D)Head trim

Answers

Answer: a i think

Explanation:


Using complete sentences post a detailed response to the following.
Virtual reality is still pretty new. Brainstorm and discuss several ways that VR programs could be used to benefit society.
What are some drawbacks?

Answers

Answer:

Headaches and Car sickness is likely whats sopping most ppl from using vr- tho that masy never go away i think thats the number one drawback

Explanation:

Discuss some of the ways to allow a non-Windows device to authenticate with a Windows based network.

Answers

The existing rules are setup to allow access based on windows group membership. I need to get a wireless jetdirect connected to the wifi network.

A web page that allows interaction from the user​

Answers

Answer:

Its A Dynamic Web Page

Explanation:

Which technology forms the foundation for cloud computing?

Answers

Answer:

Cloud Computing

Cloud Computing

Cloud computing is the on-demand availability of computer system resources, especially data storage (cloud storage) and computing power, without direct active management by the user. The term is generally used to describe data centers available to many...

Explanation:

Answer:

The answer is virtualization

Virtualization is the creation of virtual versions of something such servers, storage devices, operating systems, that allows one to share an application or a resource among multiple customers or organizations. It plays a critical role in cloud computing through sharing data that is present in the clouds like application and infrastructure.

Explanation:

1. Describe the general characteristics of a program that would exhibit very high amounts of temporal locality but very little spatial locality with regard to data accesses, and give an illustrative example.2. Describe the general characteristics of a program that would exhibit very little temporal and spatial locality with regards to data accesses.3. Describe the general characteristics of a program that would exhibit very little temporal locality but very high amounts of spatial locality with regards to data accesses.

Answers

Answer:

A program with high temporal locality with regards to data access is the tight or continuous use of a loop and a memory in chunks, while low temporal locality is little or no reuse of loop and memory. The high amount of spatial locality is the little or no reuse of branches in data access, while low spatial locality is the high reuse of branches in the code.

Explanation:

Computer program requires for a written source code to retrieve and save data to memory. A high temporal locality uses loops to continuously access memory. For speed, all the read instructions are done and the data is cached in an iterable data structure.

Spatial locality is the degree of the use of branches in a code. if more branches are used in the program, then the program is said to have low spatial locality, if little or no branches are used, then the code has high spatial locality.

Zoe has been asked to identify the external links that exist in a workbook that has primarily been managed by
another employee.
Which feature should she use?

Answers

Answer:

Data tab and external links group.

Explanation:

I'm not 100% sure but it makes the most sense

Answer:data tab and external links group

Explanation:

Draw a concept map that shows how the STEM careers are connected.

Answers

Answer:

attached below is the concept map needed

Explanation:

STEM : science technology engineering and mathematics

attached below is the concept map

from the map we can make an example on how this careers are connected

example : Production of chemical substance

science ; gives the chemical combination neededtechnology ; helps keep people safe from its hazardsengineering ; produces the chemical substancemathematics ; provides accurate measurement

What's one example of action could you take on the Internet that would be both unethical and illegal?

Answers

Answer:

bullying

Explanation:

bullying affects a person mentally via the technological medium which can even result in future physical harm, henceforth it is unethical

Bullying is  one example of action could you take on the Internet that would be both unethical and illegal.

What is Bullying?

Bullying is a type of hostile behavior in which one person purposefully and repeatedly causes harm or discomfort to another. Bullying can occur through verbal abuse, physical aggression, or more covert tactics.

The victim of bullying generally struggles to defend themselves and does nothing to "cause" the bullying.

Cyberbullying is the verbal threatening or harassing behavior carried out on electronic platforms such text messages, social media, email, and cell phones.

Therefore, Bullying is  one example of action could you take on the Internet that would be both unethical and illegal.

To learn more about Bullying, refer to the link:

https://brainly.com/question/10566405

#SPJ3

What is the function of a breadcrumb trail in a website?

Answers

It lets users keep track of what they’re doing

Answer: traces between homepage and current web page

Explanation:


Connie needs to use the data consolidation tool in Excel 2016. Where can she find this capability?

Answers

The answer is D

Explanation:

I just took the test and got 100%

In HTML, what is an element?
O The text browser displays when a user points the mouse pointer to it
O The tag that tells the web browser what the source of a file is
O The combination of a start and end tag, not including the tagged content
O The combination of a start and end tag, together with the tagged content

Answers

Answer:

The right answer is Option D: The combination of a start and end tag, together with the tagged content

Explanation:

HTML stands for hypertext markup language. It is one of the most commonly used languages on the internet.

Element:

An element in HTML consists of a start tag and end tag, and contains some content between the two tags.

i.e.

<tag> Content </tag>

Hence,

The right answer is Option D: The combination of a start and end tag, together with the tagged content

Answer:

The right answer is Option D: The combination of a start and end tag, together with the tagged content

Explanation:

goods purchased from Ravi rs 30000 and paid cash with cash discount of 5%​

Answers

Answer:

rs 24000 I believe

Explanation:

The primary benefit of digital distribution is that more audiences are able to purchase and view a film
True or False?

Answers

Explanation:

The answer could be either-or. At the moment True because people are in quaritine and can't go to movie theaters or go buymovies from a store. It could also be false because not everyone owns a computer or has access to the internet. Also, the number of family houses that have internet are growing.

It all depends on the context I guess. You could say true becuase the number of families with wifi is growing and we're all being quarantined or you could say false because not everyone has access to the internet.

what does he put the cd drive

Answers

Answer:

a disk drive duh

Explanation:

Name three technologies and what their used for before the creation of computers (first to answer correctly will get branlies

Answers

Morse, to send information quicker during a war

Telegram, to send news across the country

And possibly radio?

4.3 mini programs AP computer science

Answers

1.

name = input("Enter your name: ")

num1 = int(input("Hello "+name+ ", enter an integer: "))

num2 = int(input(name+", enter another integer: "))

try:

   if num1 % num2 == 0:

       print("The first number is divisible by the second number")

   else:

       print("The first number is not divisible by the second number")

except ZeroDivisionError:

   print("The first number is not divisible by the second number")

try:

   if num2 % num1 == 0:

       print("The second number is divisible by the first number")

   else:

       print("The second number is not divisible by the first number")

except ZeroDivisionError:

   print("The second number is not divisible by the first number")

2.

import random, math

num1 = float(input("Enter a small decimal number: "))

num2 = float(input("Enter a large decimal number: "))

r = round(random.uniform(num1, num2), 2)

print("The volume of a sphere with radius " + str(r) + " is " + str(round(((4 / 3) * math.pi * (r ** 3)), 2)))

I hope this helps!

The location of a file is specified by its ________. a. domain b. file path c. file type d. file extension

Answers

Answer:

File path

Explanation:

Literally, file path implies the location of a particular file

This in other words means that: the location of a file is defined or specified by its path.

Take for instance a text file named abc located at the desktop could have its file location to be C:\Users\HP\Desktop\abc.txt

Other options such as file type means the type of the file which could be a text file, an image, etc. and file extension is a suffix that indicates the file type (e.g. jpg, txt, png, etc).

So, from the list of given options; file path answers the question.

Write code which takes a user input of a String and an integer. The code should print each letter of the String the number of times the user inputted in reverse order. I believe it's supposed to use nested loops, but I can only get it to repeat the whole word backwards x times.

ex.
Input a String:
code
Input an integer:
3
eeedddoooccc

Answers

import java.util.*;

public class myClass {

public static void main(String args[]) {

Scanner scan = new Scanner(System.in);

System.out.print("Input a String: ");

String str = scan.nextLine();

System.out.print("Input an integer: ");

int num = scan.nextInt();

for(int i=str.length()-1; i>=0; i--) {

for(int j=0; j<num; j++) {

System.out.print(str.charAt(i));

}

}

}

}

Which of the following can help you get pre-approved for a loan? A. Having a college degree B. Having a good credit score C. Knowing which house you want to buy D. Living close to the bank or lending institution MAKE YOU BRRAINELEST

Answers

Answer:

A

Explanation:

Answer:

B

Explanation:

Other Questions
2. In Squidward's family, a blue body color (B) is dominant to green (b). Determine the phenotype for eachgenotype below based on this information.BBBbbb Simplify by combining like termsm - (2m + 5n - 3m) 1. At the beginning of the month, Michael had $22 in his account at the school bookstore. Use a variable to represent theunknown quantity in each transaction below and write an equation to represent it. Then represent each transaction on anumber line. What is the unknown quantity in each case?First he bought some notebooks and pens that cost $16.Then he deposited some more money and his account balance was $27.Then he bought a book for English class that cost $39.Then he deposited exactly enough money so that he paid off his debt to the bookstore. Is this relation a function by using straight line test Choose the best Spanish equivalent to the phrase. She refused to go to the party. No quise ir a la fiesta. No quiso ir a la fiesta No queria ir a la fiestaNo querias ir a la fiesta Need help first gets brainiest! Tex: Je ______ un caf, s'il vous plat. (vouloir) ? Whats 1+1 whoever explains best gets brainlest;) detail it with a Pharagraph kiddos these four steps are important when setting a goal, but they are in the wrong order. What is the correct order of the steps from start to finish. Jake spent a three-day weekend on the lake. On Saturday, he rented a pontoon boat for three hours and paid $435. On Sunday, he rented the same boat for five hours and it cost him $625. If he rented the same boat on Monday for just two hours, what is the cost for Jake to rent the pontoon boat for the entire three-day weekend? Which of the following fossil sequences is listed from earliest to latest?a)Orrorin tugenensis, Ardipithecus ramidus, Sahelanthropus tchadensisb)Ardipithecus ramidus, Sahelanthropus tchadensis, Orrorin tugenensisc)Sahelanthropus tchadensis, Orrorin tugenensis, Ardipithecus ramidusd)Orrorin tugenensis, Sahelanthropus tchadensis, Ardipithecus ramidus In an orchard, there are 6 apple trees for every 4 pear trees. Create a ratio table to determine the number of apple trees in the orchard if there are 42 pear trees. I need help on this please and thank you and Ill like to see an explanation so I can see how to do this thanks Explain the Henri Fayol's theory of management Write a 250 word minimum about the cage; Marcel Marceau beginning, middle and end Maryam wants to make a jug of juice A computer is normally $800 but is discounted to $525. What percent of the original price does Mark pay? Round to awhole percentA) 16.5%B30%C 7096D 66% I need help please. What is main distinction between modern communism and socialism Jon walked 90 feet in 10.4 seconds. What is his speed in miles per hour? (1 mi=5280 ft)