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 sAdd print statement inside the method My name is sCall the method with your name from main method Create constructor of the class LabOne and create new attribute zUse constructor to set the value of z zPrint the value of z from the main method Create static method called number that takes integer parameter x and return value.Call this method from main method Create another class in the same file called LabOneAdd method called sum that takes two integer and print the sum of itCall the method from class LabOne Create an abstract class called Vehicle which attributes VID and Vname. 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
