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
Dima020 [189]
3 years ago
8

java class What is the output of the following JAVA program (Java assumes public if no access modifier is given)? class Test { p

ublic static void main(String[] args) { Test obj = new Test(); obj.start(); } void start() { String stra = ""do""; String strb = method(stra); System.out.print("": ""+stra + strb); } String method(String stra) { stra = stra + ""good""; System.out.print(stra); return"" good""; } }
Computers and Technology
1 answer:
Natasha2012 [34]3 years ago
6 0

Answer:

The answer to the given question is it will produce an "error"  

Explanation:

In the given java program it will produce an error because in java we do not use double quote("""") for message printing. We use a single quote("") for message printing. In the given program if we use a single quote(""). so it will give output that is "dogood:dogood".

The correct program to this question is can be given as:

Program:

public class Test  //define a class test.

{

   public static void main(String[] args)  //define main method

   {

       Test obj = new Test();   //create class object  

       obj.start(); //calling function

   }  

   void start()  //define function start.  

   {

       String stra = "do";   //define variable and assign value.

       String strb = method(stra);  //define variable and pass stra variable in method() function as a parameter.

       System.out.print(":"+stra + strb); //print value.  

   }

   String method(String stra)  //define function method  

   {  

       stra = stra + "good";   //add value

       System.out.print(stra);  //print value of stra

       return"good";  //return value

   }

}

Output:

dogood:dogood

You might be interested in
which of the following is required to establish a new network switch and configure its IP address for the first time
dlinn [17]

Out-of-band management is required to establish a new network switch and configure its IP address for the first time.

<h3>What is Out-of-Band management?</h3>

Out-of-Band management is known to be a form of services that makes sure that a tech do not require to be sent onsite and it is one where remediation can be done in a remote place.

Hence,  Out-of-band management is required to establish a new network switch and configure its IP address for the first time.

See full question below

Which of the following is required to establish a new network switch and configure its IP address for the first time?

A. Client-to-site VPN

B. Site-to-site VPN

C. Out-of-band management

D. In-band management

Learn more about IP address from

brainly.com/question/24930846

#SPJ1

6 0
2 years ago
Can you help me here please​
Lisa [10]

Explanation:

1) ethiCal : he is a good person to be socialized .

unethical : he should not trust the people so easily that he have never met and gave the password to them

2) ethical: she is a good girl to login in time and kepp only respected points

unethical : she should have Ateach her friends that they should not fight and discuss the right answer correctly

4 0
2 years ago
Which of the following best describes how computing devices represent information ​
olganol [36]

Answer:

A system is which a computer is used to turn data into information best describes a computer-based information system.

A text code is a system that uses binary numbers (1s and 0s) to represent characters understood by humans (letters and numerals). y An early text codesystem, called EBCDIC, uses eight-bit codes, but is used primarily in older mainframe systems.

Data processing is simply the conversion of raw data to meaningful information through a process. ... Similar to a production process, it follows a cycle where inputs (raw data) are fed to a process (computer systems, software, etc.) to produce output (information and insights).

The central processing unit consists of electronic circuits that interpret and execute program instructions, as well as communicate with the input, output, and storage devices. It is the central processing unit that actually transforms data into information. Data is the raw material to be processed by a computer.

Explanation:

5 0
3 years ago
The Program Status Word contains status information in the form of condition codes, which are bits typically set by the programm
dusya [7]
False, I took the test and got 100%
3 0
3 years ago
Somebody supplied me with a file that was edited on a Windows machine. The file contains carriage returns in addition to the new
maria [59]

Answer:

It is  tr.

Explanation:

For removing all the carriage returns you can make use tr like

tr '\r\n' ' '

However, you cannot make use of the diff which finds the difference between the two files.

Onl is definitely not an option and cut holds different meaning that we know, Hence the above answer, tr can definitely help as shown above,

3 0
3 years ago
Other questions:
  • 20 points/ When creating a storyboard, in which section do you mention how you move from one shot to the next?
    11·1 answer
  • _____ create computer programs by using their knowledge of computer science, math, and other disciplines.
    11·1 answer
  • Why do contour lines never cross?
    5·1 answer
  • Which is the standard font and size for most professional papers?
    14·1 answer
  • For businesses and organizations under recent compliance laws, data classification standards typically include private, confiden
    11·1 answer
  • Who was the founder of the location-sharing site Whrrl
    6·1 answer
  • Provide all resonance structures of the sigma complex when aniline reacts with an electrophile to yield the para-substituted pro
    11·1 answer
  • What do workspaces allow a company to do?
    9·1 answer
  • Convert the decimal integer, 353.87510 to each of these forms:
    9·1 answer
  • ¿Como viaja la información? en la tecnologia
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!