Home > Back-end >  Java: define a class member method including triangle pupil
Java: define a class member method including triangle pupil

Time:09-16

Don't know why wrong, bosses to help, thank you

CodePudding user response:

The code posted? ! Can't to debug your program, let others to knock the code again?
Question: when method is called, to be behind the method name and a pair of parentheses, similar to the following format:
 
Aa. Zhouchang ()

CodePudding user response:

So write to
 System. Out. Printf (" % d \ t % f ", aa. Zhouchang (), aa. The area ()); 

CodePudding user response:

Function calls and attribute access, there is a difference between
Scenario is a function call, brackets, said because the function call is exquisite parameters, empty parameters,
System. The out. Printf (" % d \ t % f ", aa. Zhouchang (), aa. The area ());

CodePudding user response:

You have a problem of this area is for (a + b + c)/2 has precision loss,

CodePudding user response:

Is your pupil method, call methods to make something like this: fun ()
  • Related