- 2

Give the code for user input in the main method given the following code of a class name website with a method with 2 parameters

Code:- public class website { string webname; int webage; //constructor website(string name,int age); this.webname=name; this.webage=age; }

31st Jul 2021, 9:52 AM
Samuel Simiyu
Samuel Simiyu - avatar
3 odpowiedzi
+ 1
Do you want to initialize a website object with user input, did I understandthis correctly? Please link your code attempt. :)
31st Jul 2021, 10:46 AM
Lisa
Lisa - avatar
+ 1
Lisa Yeah you have understood it correctly
31st Jul 2021, 4:11 PM
Samuel Simiyu
Samuel Simiyu - avatar
0
Here's how to get user input in java: Lesson 5.1, https://www.sololearn.com/learning/2220/
31st Jul 2021, 4:15 PM
Lisa
Lisa - avatar