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
Naddik [55]
3 years ago
9

Which of the given assertion methods will return true for the code given below? Student student1 = new Student(); Student studen

t2 = new Student(); Student student3 = student1;
The Student class is as follows.
public class Student{
private String name;
}
a. assertEquals(student1, student2);
b. assertEquals(student1, student3);
c. assertSame(student 1, student3);
d. assertSame(student1, student2);
Computers and Technology
1 answer:
Svetradugi [14.3K]3 years ago
6 0

Answer:

The true statements are :

A. assertEquals(student1,student2)  

C. assertSame(student1,student3)

Explanation:

AssertEquals() asserts that the objects are equal, but assertSame() asserts that the passed two objects refer to the same object or not, if found same they return true, else return false.

You might be interested in
Java Eclipse homework. I need help coding this
kirill [66]

import java.util.Scanner;

public class BaseConvertor {

   

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       System.out.println("Welcome to Base Convertor! This program will convert numbers into different bases of your choosing.");

       System.out.print("Do you still want to run the program? ");

       String ans = scan.next();

       if (ans.toLowerCase().equals("yes")){

           System.out.println("1. Octal");

           System.out.println("2. Binary");

           System.out.println("3. Hexadecimal");

           System.out.print("Type the number of the base you want to conver to: ");

           int base = scan.nextInt();

           System.out.print("Enter your number: ");

           int num = scan.nextInt();

           if (base == 1){

               

               String newNum = Integer.toOctalString(num);

               System.out.println(num+" in Octal is "+newNum);

           }

           else if (base == 2){

               String newNum = Integer.toBinaryString(num);

               System.out.println(num+" in Binary is "+newNum);

           }

           else if (base == 3){

               String newNum = Integer.toHexString(num);

               System.out.println(num+" in Hexadecimal is "+newNum);

           }

                   

       }

       else{

           System.out.println("Have a good day!");

       }

   }

   

}

I hope this helps!

6 0
3 years ago
Which of the following is not a thing needed to make a network?
lianna [129]

Answer:

d) cables is your answer

8 0
4 years ago
Read 2 more answers
To summarize means to
vredina [299]

Answer:

To summarize is to explain the main idea in as few words as possible. So the answer is the last statement, to "Condense the main idea into a few words". Hope this helped.

3 0
3 years ago
Read 2 more answers
How to combine multiple documents into one pdf.
sergeinik [125]

Answer:

How to combine and merge your files into one PDF: Open Acrobat DC to combine files: Open the Tools tab and select "Combine files." Add files: Click "Add Files" and select the files you want to include in your PDF. You can merge PDFs or a mix of PDF documents and other files.

Explanation:

8 0
3 years ago
What controls network connectivity such as Wi-Fi and the GPS locator in a mobile device?
MakcuM [25]

Answer:

There are hybrid system that consist of WiFi, GPS, GSM and IP address to locate the mobile devices.

Explanation:

In Cellular phone communication, hybrid technique is used to locate to find the locations. It consist of WiFi, GSM, GPS and IP addresses. GPS technology is used with satellite communication. Location has been sent from satellite to the mobile network with the help of Google maps. There are few other techniques used to such as GSM based techniques that is used by the help of radio signals strength to find the location of the device. This technique is helpful in the areas where the many communication tower are there to locate the signal strength in the area of the mobile device. WiFi also used to locate the mobile device with the help of IP addresses.

In mobile phones, different combinations of all above technologies used to provide the network connectivity such as WiFi and GPS locator in the mobile Phone.  This is called Cellular locating technology.

5 0
3 years ago
Other questions:
  • Colours in art packages are often given Hex codes as illustrated below with #00ccff. Why is Hex used in this way rather than the
    11·1 answer
  • Subnetting is accomplished by borrowing bits from the _____ portion of an ip address and reassigning those bits for use as netwo
    13·1 answer
  • Which is the most common drive letter where Windows stores most data and programs? A. A B. B C. C D. E
    12·2 answers
  • In CadStd, what does the Zoom All button do? A. Makes a drawing bigger so you can see small details B. Returns a drawing to a si
    5·1 answer
  • What will you see on the next line?
    6·2 answers
  • What is the description of ?
    13·1 answer
  • Convert Fahrenheit to Celsius using this formula: F = (9/5)*C+32
    5·1 answer
  • Zoe wants to use an image file that will allow her to preserve all of the original
    10·1 answer
  • Most jobs in computer disciplines require which minimum level of education?
    12·2 answers
  • An Accenture healthcare client is interested in implementing an Artificial Intelligence (AI) solution to improve patient care, b
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!