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
public class Questions { public static void main(String[] args) { System.out.print("Here "); System.out.println("There " "Everyw
In-s [12.5K]

Answer:

The output of this code can be given as follows:

Output:

Here There Everywhere

But notin Texas

Explanation:

In the give java code a class "Questions" is defined inside this class the main method is defined in the main method we use three print function that can be described as follows:

  • In the first print function, we print the message that is "Here".
  • In the second and third print function, we use println that print data or message in the next line that is "There Everywhere" and in the next line  "But not" and "in Texas".
6 0
3 years ago
When attaching a file or files in outlook 365 you select the attach command and then select the files location
mamaluj [8]

Answer:

When you click the attachment button a window pops up allowing you to select the file/s you want to upload

You can also drag and drop file/s this is an alternative method

Explanation:

Microsoft Outlook is a personal information manager software system from Microsoft.

Though primarily an email client, Outlook also includes such functions as calendaring, task managing, contact managing, note-taking, journal logging, and web browsing. Wikipedia

3 0
2 years ago
Where can I find information regarding different career choices in AZCIS?
Vadim26 [7]
I think Internet is the best way to search career choices. You can get a lot information.

4 0
3 years ago
Q1) Convert the decimal number 67 to binary?​
Mashutka [201]

Answer:

1000011

Explanation:

4 0
3 years ago
explain how a computer screen and the eye interact to produce the variety of colors that we see from the 3 colors that are actua
Dima020 [189]

Answer:

Each pixel of light coming from your computer is made up of a combination of Red, Blue and Green light of different intensities. As this pixel of light is so small your eye only "sees" the combination of those 3 pixels as the intended colour. (as opposed to just red, green and blue light) (This is also known as additive colour mixing)

5 0
3 years ago
Other questions:
  • Prompt the user for a string that contains two strings separated by a comma. (1 pt)Examples of strings that can be accepted:Jill
    5·1 answer
  • The init() command initializes the task queue and scheduler data structures. run Next Task() MUST run to completion whatever tas
    9·1 answer
  • When completing an application what color ink do you use
    8·2 answers
  • A technician wants to update the organization's disaster recovery plans. Which of the following will allow network devices to be
    13·1 answer
  • Anybody know this question??
    8·1 answer
  • During data declaration, a name is binded to a memory location, what else can be identify as part of this process?
    12·1 answer
  • Which of the following might an interior designer in the retail industry specialize in?
    9·1 answer
  • Roses are red, violets are blue, I'm going to ki.ll myself, to make life better for you.
    10·2 answers
  • Q.drtrdyudoijoemrkdf
    6·2 answers
  • What maintains data about various types of objects, events, people, and places?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!