hello error Why is the error not happening?
Get_set and constructor
Because it makes no sense it’s not real or valid java code on line 13 you wrote name1: and age1: but your cons class constructor is only set up to take a string and an integer so it should look like this cons co = new cons(“Jack”, 20); and line 8 cons() doesn’t do anything your makecons method is supposed to create an instance of the cons class but you don’t actually call it so your programme doesn’t do anything. To get this working change line 8 to cons co = new cons(“Jack”, 20); then on line 9 write makecons(); then delete line 13
Java is a case sensitive language your ment to use a Capital letter for class names and constructors, so when naming a class cons capitalize the first letter of the word so it would be Cons and when you create an instance of the class it would be Cons co = new Cons(“Jack”, 20); method names should be camel cased so first word should be all lowercase and every word after it should start with a capital letter so as an example your makecons method should be makeCons and a method called mycoolmethod() would be myCoolMethod()
I did not understand please can you write the code yourself and I’m newer
consturactor Is it suitable for the structure I consturactor try to use the structure
That made no sense to me try typing it in your native language and pasting in the English translation.