• Register
0 votes
96 views

Problem:

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

5 3 2
5,640 points

Please log in or register to answer this question.

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.

6 4 2
10,860 points

Related questions

0 votes
1 answer 108 views
108 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, 2020 maddi86 5.4k points
0 votes
2 answers 19 views
19 views
Problem: Given the array a, write an expression that refers to the first element of the array?
asked Apr 12, 2020 ArifulIslam 5.6k 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, 2020 ArifulIslam 5.6k points
0 votes
2 answers 18 views
18 views
Problem: A function may return a pointer, but the programmer must ensure that the pointer ________?
asked Apr 12, 2020 ArifulIslam 5.6k points
0 votes
1 answer 27 views
27 views
Problem: Which of the following is NOT a rule that must be followed when naming identifiers? A. Identifiers for constants should use an underscore between words. B. Identifiers should use periods to separate words. C. Identifiers should list the data type at the end of the name. D. Identifiers can contain spaces.
asked Mar 9, 2020 ArifulIslam 5.6k points
0 votes
1 answer 27 views
27 views
Problem: sort method What method can be used to convert a list to a tuple? The sort method rearranges the elements of a list so they appear in ascending or descending order.
asked Nov 6, 2020 Mashhoodch 5.6k points
0 votes
1 answer 53 views
53 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, 2020 Gavin 15.3k points
0 votes
1 answer 12 views
12 views
I noticed that in the loop of STATEMENT 1 we put (* p ++) and supposedly this represents that it is going to loop through an element of the array. But I start to think that the logical thing would be that if my pointer is starting at position [0]; in the loop of DECLARATION 1 I would start saving it in position ... position" << i << ":"; cin >> * p;         * p ++;     } * /          return 0; }
asked Aug 14, 2020 game 4.6k points
0 votes
1 answer 22 views
22 views
Problem: Write a conditional that assigns True to fever if temperature is greater than 98.6.?
asked Apr 18, 2020 ArifulIslam 5.6k points
1 vote
1 answer 56 views
56 views
Problem: Is a programming language that can be used to create a wide range of windows applications?
asked Mar 23, 2020 ArifulIslam 5.6k points