Explanation of Solution
Structure Diagram:
Strange
Explanation:
The above diagram is the structure diagram for the given program. In the diagram, there is a class declared named “Strange” and this class contain four static methods which are, “first()”, “second()”, “third()” and “main()”. Every method has defined inside the “Strange”. Inside the definition of “second()” method, the method. “first()” is called. Inside the “second()” method, the “first()” and “second()” method is called. The “main()” method is defined and the methods, “first()”, “second()” and “third()” is called.
Program code:
//define a class
class Strange
{
//define a method first()
public static void first()
{
//print the statement
System.out.println("Inside first method");
}
//define a method second()
public static void second()
{
//print the statement
System.out.println ("Inside second method");
//call the method first()
first();
}
//define the method third()
public static void third()
{
//print the statement
System...
Trending nowThis is a popular solution!
Chapter 1 Solutions
Building Java Programs: A Back To Basics Approach, Loose Leaf Edition (5th Edition)
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education