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]
2 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]2 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
I am trying to figure out why I keep having the errors on the right side.
Y_Kistochka [10]

Shut down your computer and try again.

6 0
2 years ago
How can i change ip address <br>​
JulijaS [17]

I believe your answer would be:

1: Open the command prompt window. Do this by clicking the "Start" button, and then selecting "Run." In the window that appears, type "cmd" into the text box and click the "OK" button.

2: Release the computer's current IP address. To do this, type "ipconfig /release" into the command prompt window and press Enter.

3: Acquire a new IP address. Do this by typing "ipconfig /renew" into the command prompt window and pressing Enter. This should assign the computer a new IP address, which will be different from the previous address.

4: Cycle your modem's power. If the above steps don't work, you can try renewing your IP address by cycling your modem's power. Turn off both your computer and your modem (and your router, if you have one). Wait at least 5 minutes, then turn everything back on. If your computer is set to receive an IP address dynamically (the most likely configuration), you should be assigned a new IP address automatically.

5: Check to make sure your IP address has changed. To do this, you can log on to a number of different websites that tell you your IP address.

Hope I helped, if so may I get brainliest and a thanks?

Thank you, Have a good day! =)

7 0
3 years ago
Explain the difference between using the int type and the double type for numbers.
MaRussiya [10]
They have different semantics, <span>addition to having different semantics from </span>double<span>, </span>int<span> arithmetic is generally faster, and the smaller size (32 bits vs. 64 bits) leads to more efficient use of caches and data transfer bandwidth.....
Did That Help You In Anyway </span>
6 0
3 years ago
Question 4 1 pts The following code could be rewritten using: if (x &gt; 12): if (x &lt; 34):​
artcher [175]

Answer:

if(x>12 || x<34)

Explanation:

Mashing the two together using the or '||' operator would allow to run both necessary functions for the next code.

7 0
2 years ago
A rootkit is software and file folders that are hidden from view and permit viruses, spyware, and malware to be installed on a P
Zanzabum

Answer:

TRUE

Explanation:

A rootkit is a collection of computer software, typically malicious, that is designed to grant an unauthorized user access to a computer or certain programs. Once a rootkit is installed, it is easy to mask its presence, so an attacker can maintain privileged access while remaining undetected.

Rootkit detection is difficult because a rootkit maybe able to subvert the software that is intended to find it.

Rootkits work by using a process called modification (the changing of user account permissions and security).

Rootkits are not malware themselves, but rather a process used to deploy malware on a target.

Therefore, it is TRUE that a rootkit is software and file folders that are hidden from view and permit viruses, spyware, and malware to be installed on a PC without the knowledge or consent of a user.

3 0
2 years ago
Other questions:
  • What are examples of educational obstacles to a career plan?
    13·1 answer
  • Try writing pseudo code that describes how your device uses input data to perform the action that you want.
    9·1 answer
  • 3. What term refers to the physical locations of elements in relation to each other?
    10·2 answers
  • A(n) _____________ is a system that prevents a specific type of information from moving between untrusted networks and private n
    9·1 answer
  • Deleting anitem from a linked list is best when performed using two pointersso that the deleted item is freed from memory.
    7·1 answer
  • A company database needs to store information about employees (identified by ssn, with salary and phone as attributes), departme
    7·1 answer
  • Explain how AI smartphone software in the rental car can be a threat to privacy.
    14·1 answer
  • A column does not consist of
    10·1 answer
  • Select the three concepts of capital outlay.
    15·1 answer
  • Utilizando o padrão de medidas e unidades do National Institute of Standards and Technology, em que 1 KB é igual a 1.000 Bytes,
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!