+ 2
help
Fill in the blanks to create a class with a method called "myFunc" that takes no parameters, returns void, and prints "Hi" to the screen. public myClass public myFunc { System.out.println(''Hi''); } }
9 Answers
+ 10
public class myClass
{
public void myFunc()
{
System.out.println(''Hi'');
}
}
0
public
class
myClass
{
public
void
myFunc
()
{
System.out.println(''Hi'');
}
}
0
public *class* myClass *{*
public *void* myFunc*()* {
System.out.println(''Hi'');
}
}
0
********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
0
Fill in the blanks to create a class and its constructor, taking one argument and assigning it to the "name" attribute. Then create an object of the class.
i pend hours on this what is the solution?
0
public
myClass
public
myFunc
{
System.out.println(''Hi'');
}
}
0
public
class
myClass
{
public
void
myFunc
()
{
System.out.println(''Hi'');
}
}
0
Public class my class{
Public void myFunc(){
System.out.println("Hi");
}
}
- 2
public void myFunc(){
}
You must write void