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
7. Accepting things that happen without trying to change them is known as
alukav5142 [94]

Answer:

accept people for who they are instead of trying to change them

Explanation:

i don't know if this is right or wrong but i hope this helped you :)

3 0
3 years ago
Which feature of a blog allows an author to interact and get feedback from his or her readers? link pingback commenting TweetMem
poizon [28]
Commenting. When someone comments of a blog the blog's writer can comment back, to answer questions, etc.
6 0
3 years ago
RFID can be used for all of the following applications except:_________.
serious [3.7K]

Answer:

B. Access point repeater

Explanation:

RFID can be used for all of the listed applications except for Access point repeater. This is because Radio Frequency Identification is a technology, which includes wireless data capture and transaction processing for both short and long-range applications. Usually tracking, tracing, accessing, and managing information. It can unfortunately not be used for repeating the same RFID signal or any access point for that matter.

3 0
3 years ago
write a function that given an integer Y and 3 non-empty string A,B,W, denotingthe year of vacations, the beginning month, the e
chubhunter [2.5K]

Answer:un spain please

Explanation:

4 0
3 years ago
What did Bill Gates invent?
Viktor [21]
He invented microsoft.
8 0
3 years ago
Read 2 more answers
Other questions:
  • What are some consequences of internet addiction​
    9·1 answer
  • _________ is the process of scanning the network to find out which Internet Protocol (IP) addresses are attached to potentially
    9·1 answer
  • A nonpipelined system takes 300ns to process a task. The same task can be processed in a 5-segment pipeline with a clock cycle o
    10·1 answer
  • What are the top and side margins for a letter typed in standard format?
    5·1 answer
  • ____________ hackers break into systems legally for non-malicious reasons such as to test system security vulnerabilities
    7·2 answers
  • Jorge is looking for information about the life of his favorite music artist, Ray Charles. Which type of resource(s) would provi
    13·1 answer
  • Why bootable installer preparation is important? explain
    9·1 answer
  • 2. The Internet could best be described as: *
    12·1 answer
  • A corporate or government network that uses Internet tools, such as Web browsers, and
    13·1 answer
  • Match the image to the view type in a presentation program. scroll bar tool bar status bar menu bar provides an array of buttons
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!