Question: Create public method called name with String parameter s . Add print statement inside the method ( My name is + s )

Create public method called name with String parameter s.Add print statement inside the method ("My name is "+ s)Call the method with your name from main method.10- Create constructor of the class LabOne and create new attribute z.Use constructor to set the value of z z=4.Print the value of z from the main method.11- Create static method called number that takes integer parameter x and return value.Call this method from main method.12- Create another class in the same file called LabOne2.Add method called sum that takes two integer and print the sum of it.Call the method from class LabOne.13- Create an abstract class called Vehicle which attributes V_ID and V_name. The class has methodcalled getName and another abstract method called getID.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!