• Register
0 votes
77 views

Problem:

Write a complete main method that prints Hello, world to the screen?

5 3 2
5,650 points

1 Answer

0 votes

Solution:

public static void main( String [] args )
{
System.out.println( Hello, world );

System.exit( 0 );
}

 

Explanation:

A method in object-oriented programming like Java, Python is a procedure associated with a class. A method defines the behavior of the objects that are created from the class. Another way you can say that this is that a method is an action that an object is able to perform. The association between method and class is called binding. Method and a function are the same, with different terms. A method is a procedure or function in object-oriented programming.

5 2 1
10,860 points

Related questions

0 votes
1 answer 77 views
77 views
Problems: I need help in programming to solve my issue. Is there anyone who can help me ? Write a complete main method that prints Hello, world to the screen?
asked Feb 13 maddi86 5.4k points
0 votes
2 answers 14 views
14 views
Problem: Given the array a, write an expression that refers to the first element of the array?
asked Apr 12 ArifulIslam 5.7k points
0 votes
1 answer 18 views
18 views
Problem: Given that play_list has been defined to be a list, write a statement that sorts the list?
asked Mar 9 ArifulIslam 5.7k points
0 votes
1 answer 30 views
30 views
Problem: Hello kodlogs, I am new in this python language switched from the c language I want to know that how can we convert the tuple to a list we can achieve this by the list by list() , but is this a typecast like we were doing in the string to an integer?
asked Jun 8 Gavin 15.3k points
0 votes
2 answers 9 views
9 views
Problem: A function may return a pointer, but the programmer must ensure that the pointer ________?
asked Apr 12 ArifulIslam 5.7k points