You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class Lab37ObjectOfBookClassWithCallingParameterizedConstrutor {
String bookName;
String author;
int price;
Lab37ObjectOfBookClassWithCallingParameterizedConstrutor(String bookName, String author, int price){
this.bookName = bookName;
this.author = author;
this.price = price;
}
void infoDisplay(){
System.out.println("Name: " + bookName);
System.out.println("Author: " + author);
System.out.println("Price: " + price);
}
public static void main(String[] args){
Lab37ObjectOfBookClassWithCallingParameterizedConstrutor book = new Lab37ObjectOfBookClassWithCallingParameterizedConstrutor("Nepali","Ram Parshad Dhakal",425);