Write a void method named myMethod which prints "I'm a void method!" (without the quotes). Your method should be declared public and static. You can call your method in the program's main method so you can test whether it works, but you must remove or comment out the main method before checking your code for a score.
Write a void method named myMethod which prints "I'm a void method!" (without the quotes). Your method should be declared public and static. You can call your method in the program's main method so you can test whether it works, but you must remove or comment out the main method before checking your code for a score.
Chapter3: Using Methods, Classes, And Objects
Section: Chapter Questions
Problem 6PE
Related questions
Question
![Instructions
Write a void method named myMethod which prints "I'm a void method!" (without the quotes). Your method should be declared
public and static.
You can call your method in the program's main method so you can test whether it works, but you must remove or comment out the
main method before checking your code for a score.
Files
U5 L1 Activity_One.java
1
2
10
3 import java.util.Scanner;
4
5 public class U5_L1_Activity_One
6- {
7
8
9
11
12-
13-
14
15
16
է
NOT SUBMITTED
* Lesson 1 Coding Activity Question 1 */
17 }
RESET
}
*/
SAVE
/* Add the method myMethod here */
// You can uncomment and add to the main method to test your
code
// You will need to remove/comment out this method before
checking your code for a score
public static void main(String[] args) {
SUBMIT
INSTRUCTIONS
A
RUN CODE
► RUN CODE
GRADING
CLEAR
KX
KY
HISTORY
STOP](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F17fb7c04-187c-4763-b6c5-1b444cd4b1ad%2F98c300fe-d306-43d7-9891-76d30d76db3a%2Fwvqg78_processed.png&w=3840&q=75)
Transcribed Image Text:Instructions
Write a void method named myMethod which prints "I'm a void method!" (without the quotes). Your method should be declared
public and static.
You can call your method in the program's main method so you can test whether it works, but you must remove or comment out the
main method before checking your code for a score.
Files
U5 L1 Activity_One.java
1
2
10
3 import java.util.Scanner;
4
5 public class U5_L1_Activity_One
6- {
7
8
9
11
12-
13-
14
15
16
է
NOT SUBMITTED
* Lesson 1 Coding Activity Question 1 */
17 }
RESET
}
*/
SAVE
/* Add the method myMethod here */
// You can uncomment and add to the main method to test your
code
// You will need to remove/comment out this method before
checking your code for a score
public static void main(String[] args) {
SUBMIT
INSTRUCTIONS
A
RUN CODE
► RUN CODE
GRADING
CLEAR
KX
KY
HISTORY
STOP
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781305480537/9781305480537_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781305480537/9781305480537_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,