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
Veseljchak [2.6K]
3 years ago
9

Write a Student class in Java which has a name, id_number, year (e.g. 2) and

Computers and Technology
1 answer:
Fittoniya [83]3 years ago
8 0

Answer:

Following are the code in java

public class Student

{

// member variables

String name;

String id_number;

int year ;

String programme_code ;

// default constructor

public student()  //default constructor

{

name="san";

id_number="12";

year =2010;

programme_code="ECE";

}  

 // method to display the member variables of the Student

 public void display() // dispaly the value

{

System.out.println("Name is  : "+name);

System.out.println("ID is  : "+id_number);

System.out.println("Year is  : "+year);

System.out.println("Programme code is : "+programme_code);

  }

public static void main (String[] args) // Main method

{

 Student ob=new Student();

 ob.display(); // calling the method display  

}  

}

Explanation:

In this we create a class "student "  name,id_number, year and  programme_code are the variable after that create a default constructor and initialize the variable and finally display the variable .In the main method we create a object of student class i.e ob ,and call display method  with object ob.

Output:

Name is  :san

ID is  : 12

Year is  :2010

Programme code is : ECE

You might be interested in
what component of virtualization controls all physical memory, and thus has the ability to make any unused memory pages in each
svlad2 [7]

Since the hypervisor, a component of virtualization, is in charge of managing all physical memory, it can make any memory pages left over in each guest virtual machine available to other virtual machines or the host computer.

<h3>What Exactly Is A Hypervisor?</h3>

A hypervisor is a class of computer software, firmware, or hardware that builds and manages virtual machines (also known as a virtual machine monitor, VMM, or virtualizer). A host machine is a computer on which a hypervisor is running one or more virtual machines, and a guest machine is a specific virtual machine. The hypervisor controls how the guest operating systems are executed and provides them with a virtual operating environment. The visitor often uses the native hardware to carry out instructions, unlike an emulator. The virtualized hardware resources may be shared by several instances of various operating systems. For instance, Linux, Windows, and macOS instances can all operate on a single real x86 computer. Contrastingly, with operating-system-level virtualization, each instance (often referred to as a container) only needs to share a single kernel, while the guest operating systems—such as various Linux distributions using the same kernel—can differ in user space.

To know more about Softwares, visit:

brainly.com/question/1022352

#SPJ4

6 0
1 year ago
When completing an application what color ink do you use
tankabanditka [31]

Black or blue pen would be appropriate.

5 0
3 years ago
Read 2 more answers
How to remove negative feedback on amazon?
Svetlanka [38]
1. go back to the feedback you submitted
2.Locate the order, and then click remove 
3.select a reason for the removal and click to remove the feedback button.

(But why would you write a rude comment in the first place to begin with?)
3 0
3 years ago
PLEASE HELP I WILL MARK BRAINIST!!!!!!!!!<br><br><br> What is a rolodex?
Mariana [72]
Its a gadget that helps organize cards/ a rotating file device.
5 0
3 years ago
A chief Information Security Officer (CISO) is performing a BIA for the organization in case of a natural disaster. Which of the
nataly862011 [7]

Answer:

The correct answer is option (D) Identify the impact on safety of the property

Explanation:

Solution

In every Business Impact Analysis, the first and the most important step is for the CISO is to identify and estimate the impact of the aftereffects on the business and property of an organization that may be occurred from the disaster.

Physical security is very important, but it is not noticed by most organizations. It is important if you do not want anyone to take  away your information or destroy it, in case of natural calamity. the reason could be that, the intruder is  doing it for his personal achievement, financial gain,or seeking revenge or when one is taken unaware and becomes a target. If this security is not maintained properly all the safety measures will not be useful once the attacker gets through by gaining physical access.

Example of property can be software, equipment, facilities, company’s assets.

4 0
3 years ago
Other questions:
  • A cast is required in which of the following situations? a. using charAt to take an element of a String and store it in a char b
    7·1 answer
  • Which code fragment constructs an arrray list named players that is initialized to contain the strings "player 1" and "player 2"
    15·1 answer
  • Consider the following sequence of items 10, 36, 25, 54, 37, 12, 75, 68, 42, 86, 72, 90. Insert these items in the order above,
    5·1 answer
  • Hello, can you help me answer these questions?
    9·2 answers
  • A form letter can be customized by using different fields in a __________.
    15·2 answers
  • Which computer component are you most like? Explain why.
    10·1 answer
  • Why must a mobile application be easily customized and personalized?
    14·2 answers
  • What are other ways you could use the shake or compass code blocks in physical computing projects?
    14·1 answer
  • Brainly Question
    14·2 answers
  • A relational database contains a series of _____ that can be connected to form relationships.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!