1. Engineering
  2. Computer Science
  3. complete the following program in order to produce the following...

Question: complete the following program in order to produce the following...

Question details

Complete the following program in order to produce the following expected output. You need to create a class named Student. The class has two variables named name and id. In addition, the class has two methods named setData and printData. setData is uses to initialize the variables of object from class Student and printData uses to printout the values of object’s variables. Program output: 140452759 Raed Ali Requirement: Include the screenshot of program output as a part of your answer. Answer: // your code goes here } public class MainClass { public static void main(String[] args){ Student std1 = new Student(); std1.setData(140452759, "Raed Ali"); std1.printData(); } }

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution