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
mixas84 [53]
3 years ago
13

Suppose a package pkg1 contains a class named MyClass and another package pkg2 contains a different class named MyClass. What ha

ppens when you impot both classes?
Computers and Technology
1 answer:
pogonyaev3 years ago
7 0

Answer:

Following are the solution to this question:

Explanation:

In this question, two packages "pkg1 and pkg2" is defined, that hold a class that is "MyClass", in which the class name is the same. If we import the package so, it can't import both classes in the very same file. If we really need to apply to both, then must completely specify one class name, and in the class name is different so, we simply use both classes by creating the instance.  

You might be interested in
In Java the ______________are not objects. All of the rest areobjects, or any ___________ is called as object.
Scorpion4ik [409]

Answer:

Reference type,generic type

Explanation:

Reference types are used by a reference that maintains a reference (address) to the object but not the object itself. Because reference kinds reflect the variable's address rather than the data itself, assigning a reference object to another does not copy the information. Instead, it produces a second duplicate of the reference, which relates to the same heap place as the initial value.

Examples of reference types are Classes, Arrays,, Interfaces etc.

A generic type is a generic class or interface that is parameterized over kinds. Essentially, generic types enable you to write a particular, generic class (or method) that operates with distinct kinds, enabling code to be reused.

The class Object  describes the conduct of all Java objects. However, it does not describe the conduct of all Java data structures. That's because not all Java data structures are objects. Some of them are primitive values that can be stored in object variables, but they are not objects themselves.

Unlike object types, primitive types are not sub types or super types.

6 0
3 years ago
Which of the following is not an advanced strategy you may use to help you conduct a search on the Internet?
Leno4ka [110]

Answer:

3-using a wild card in your search

7 0
3 years ago
#Step 1 Get first value from user #Remove the hastag (#) from the front of ONE of the #three lines below, which will allow the p
olga2289 [7]

Answer:

Explanation:

what is the question

6 0
3 years ago
You have repaired a broken lcd panel in a notebook computer. however, when you disassembled the notebook, you bent the hinge on
Shtirlitz [24]

First things first, you'll have to explain what happened, Secondly you must give the customer the option to choose whether he/she would prefer to temporarily take the laptop and schedule another time to have the hinge be repaired as you can provide the reason that you have prioritize to fix the functional aspect of the laptop rather than the cosmetic issues of the laptop. Putting yourself in the shoes of the customer whilst picking your statement would help to alleviate the concern or complain from the customer.

4 0
4 years ago
Choose the correct term to complete the sentence.
Diano4ka-milaya [45]

Answer:

Object-oriented programming

Explanation:

When used in object-oriented programming , a class is a factory for creating object. An object is a collection of data and behavaiors that represent some entity(real or abstract).

6 0
3 years ago
Other questions:
  • Which is missing in most areas that do not have Karst topography?
    10·2 answers
  • Are video games considered information technology
    9·2 answers
  • What is the accounting equation?
    12·1 answer
  • After a group sets a project schedule, members should be prepared to
    7·2 answers
  • Who killed mrs.huffington
    14·1 answer
  • How to select the entire table in microsoft excel
    11·1 answer
  • NEED ASAP!!
    14·1 answer
  • I need help in creating a Java Program; To calculate the chapter from which you solve the programming exercise, below are the re
    7·1 answer
  • ¿Que es un problema para ti?
    7·1 answer
  • Which formatting option(s) can be set for conditional formatting rules?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!