Answer:
The code to this question can be given as:
Code:
public class Book //define class.
{
private String title, author; //define variable.
Book(String a, String b) //define parameterized constructor.
{
title = a; //holding value.
author = b;
}
public String toString() //string function
{
return title + "\n" + author; //return value.
}
}
Explanation:
In the above java code firstly we declare the class book that name is already given in the question. Then we declare the private variable that datatype is string author and title. Then we declare the parameterized constructor. In the parameterized constructor we use the private variable for hold constructor parameter value. Then we declare the tostring() function in this function we return value of the title and author variable.
A relative URL is a type of URL that gives an abbreviated path to a resource by using the current webpage as a starting position.
<h3>What is a
relative URL?</h3>
A relative URL can be defined as a type of URL that doesn't contain or use the full address of a website, but only the path (location) following the domain name.
This ultimately implies that, a relative URL is a type of URL that gives an abbreviated path (location) to a web resource by using the current webpage as a starting position.
Read more on relative URL here: brainly.com/question/26670945
#SPJ12
The smallest v groove angle that can be welded using the FCA welding process is 20 degrees. Double v joints help for buckling forces especially in welding thicker metals.
The output printed by the code is 18
<h3>The Code Analysis</h3>
The flow of the program is as follows:
- The first line initializes a list of numbers named values
- The second line initializes fred to 0
- The third line is an iteration that is repeated for all numbers in the list
- The next statement is a conditional statement that ensures that all 9's in the list are added, and saved in fred
<h3>The Code Computation</h3>
Recall that, the initial value of fred is 0, and there are 2 9's in the list.
So, the computation is:


This means that, the last instruction on line 10 will display 18, as the output
Hence, the output printed by the code is 18
Read more about algorithms at:
brainly.com/question/11623795