Answer:
public static void printDottedLine()
{
System.out.println(".....");
}
Explanation:
The above written code is in JAVA and it is the method definition of the method mentioned in the question.Since the method returns nothing hence it's return type is void and it does not have any arguments hence there is nothing written in the parenthesis.In JAVA System.out.println is used for standard output and trminates them by newline.
Answer:
A Red Black Tree is a type of self-balancing(BST) in this tree ,each node is red or black colored. The red black tree meets all the properties of the binary search tree, but some additional properties have been added to a Red Black Tree.
A Red-Black tree's height is O(Logn) where (n is the tree's amount of nodes).
In a red-black tree with black height k
The maximum number of internal nodes is
.
The smallest possible number is
.
3. 8.1
Looking at the functions "average", and "mystery" it's pretty obvious that "average" returns a double precision average of the value of an integer array. The function "mystery" returns an array of integers with each value in the array being the length of the string in the array of strings passed to "mystery" in the same ordinal position.
The main body of the code initializes an array of strings and then passes that array to "mystery" who's output is then passed into the function "average". Since the lengths of the words passed to "mystery" is 7, 5, 6, 10, 10, 8, 13, 6, 8, 8, the sum will be 81, so the average will be 81/10 = 8.1 which matches option "3".
Answer:
// program in java.
// package
import java.util.*;
// class definition
class Main
{// main method of the class
public static void main (String[] args) throws java.lang.Exception
{
try{
// scanner object to read inputs
Scanner scr=new Scanner(System.in);
// variables
String name;
double price;
System.out.print("Enter item's name: ");
// read item's name
name = scr.next();
System.out.print("Enter item's price: ");
// read item's price
price= scr.nextDouble();
// print name
System.out.println("name of item is:"+name);
// print price
System.out.println("price of item is:"+price);
}catch(Exception ex){
return;}
}
}
Explanation:
Read name & price of item from user and assign it to variables "name" & "price" respectively with scanner object.Then print the name and price of item .
Output:
Enter item's name: Apple
Enter item's price: 100
name of item is:Apple
price of item is:100.0
37 most likely.
No programming language is specified, and you didn't put what the function is, so assuming it's already implemented, MAX should display the highest number.