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
The tcp/ip ____ layer commonly uses the transmission control protocol (tcp) to maintain an error-free end-to-end connection.
aleksklad [387]
The answer would be the TCP/IP Application Layer.
6 0
3 years ago
The best answer it requests services, data and other resources available on the server​
Brilliant_brown [7]

Answer:

Explanation:

?

6 0
3 years ago
Read 2 more answers
Random access iterators are ____ iterators that can randomly process elements of a container.
olga nikolaevna [1]

Answer:

C. Bidirectional

Explanation:

If we want to access elements at an any random offset position then we can use random access iterators.They use the functionality 'as relative to the element they point to' like pointers.Random access iterators are Bidirectional iterators that can randomly process elements,pointer types are also random-access iterators.

6 0
3 years ago
What is a common technique used in animation to make movement appear smoother?
Tom [10]
I think the answer would be blur/A, may I ask what subject this is? just curious
8 0
3 years ago
Which of the following best explains why property rights are necessary in a
11Alexandr11 [23.1K]

Answer:

A. Property rights allow consumers and producers to make free

choices.

Explanation:

If the consumers and the producers have the properties, then only they can say that well this is free for you, or in other words, can make the free choices. And by no means market forces only work when everyone owns some property, as some also cannot have the property, and hence work hard to earn some property, and thus the Market force does work. And the laws have nothing to do with the free market or the non-free market. And as we saw above, the competition can exist if someone owns the property, and others do not. Hence, the correct answer is A.

5 0
3 years ago
Other questions:
  • What are the core scripting and coding technolies used to build ai platforms?
    14·1 answer
  • ___________is a security strategy that applies multiple layers of defense because there is an assumption that any single protect
    12·1 answer
  • If a full disk encryption (FDE) password is forgotten, what can be incorporated to securely store the encryption key to unlock t
    13·1 answer
  • You asked your colleague to provide feedback on a blog post you recently wrote. When they sent you their feedback, they made edi
    10·1 answer
  • What do you do to add a line or circle to your presentation?
    7·2 answers
  • Which ORDER BY clause causes 10 rows to be retrieved from the result set, starting with the 20th row?
    5·1 answer
  • / Looks up author of selected books
    15·1 answer
  • Who wants to be my tutor?
    14·2 answers
  • What is the code for this please?​
    13·1 answer
  • This is your code.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!