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
lesantik [10]
3 years ago
8

Write java code to create a new class called "student". an object of the student class has attributes like student id, name and

address. instantiate an object of this class, with these attributes. thereafter, display these attributes to a user.
Computers and Technology
1 answer:
Fiesta28 [93]3 years ago
8 0
Here you go. I added a constructor and a toString overload to make the object creation and printing as easy as possible.

public class student {
    private String _id;
    private String _name;
    private String _address;

    public student(String id, String name, String address) {
        _id = id;
        _name = name;
        _address = address;
    }

    public String toString() {
        return "Id: " + _id + "\nName: " + _name + "\nAddress: "+ _address;
    }

    public static void main(String[] args) {
        student s1 = new student("S12345", "John Doe", "Some street");
        System.out.println(s1);
    }
}

You might be interested in
Need the answer ASAP!!!
Vlad1618 [11]

Answer: type and create of the software

Explanation:

pls mark brainliest

6 0
3 years ago
Choosing a per_formatted presentation that already has a design and the slots is called choosing What​
Aloiza [94]
A template is a predesigned presentation you can use to create a new slide show quickly. Templates often include custom formatting and designs, so they can save you a lot of time and effort when starting a new project.
8 0
2 years ago
Which of the following is a requirement for the Safety Data Sheet (SDS)?​
Natasha_Volkova [10]
What are the options?
4 0
3 years ago
Technologies that function within the established system are called
vesna_86 [32]
<span>Authorizing technologies are technologies that controls the use of system and network resources through authentication and authorization. 
</span><span>Enabling technologies are innovation technologies that drive radical change in the capabilities of a user or culture.
</span>Obstructing technologies include blocking<span> and filtering, content manipulation, attacks.
</span>Preemption means "prior seizure of" and preemptive technologies <span>take control of the operating system from one task and giving </span>it<span> to another task.
</span><span>Technologies that function within the established system are called enabling technologies.</span>
8 0
3 years ago
A type of malicious code that appears to be a safe program but that actually has a hidden purpose is called a _____.
masha68 [24]

This is a trojan horse type of virus.

5 0
3 years ago
Read 2 more answers
Other questions:
  • What is the use of word art?
    10·1 answer
  • The producer thread will alternate between sleeping for a random period of time and inserting a random integer into the buffer.
    7·1 answer
  • A database has a built-in capability to create, process and administer itself.
    14·1 answer
  • What is the value of the result after the following statement is executed? int result = 2 + 3 + 4 ;
    7·1 answer
  • In a gear system, when you gain torque you lose what?
    11·1 answer
  • What is the primary means by which attackers infect computers with these attacks? How do these attacks commonly occur?
    8·1 answer
  • How do you do 1.17.5, invert colors, on codehs?
    10·1 answer
  • Testing a website includes visiting every web page on the site and selecting every link, tab, and button available.
    11·1 answer
  • Which of the phases of the software development life cycle (SDLC) would the following action take place in?
    9·1 answer
  • Which type of computer is used microprocessor​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!