How to print the result of a method with System.out.println

前端 未结 5 2044
萌比男神i
萌比男神i 2021-01-17 02:34

How do I print out the result of a method? I want to print out the return of translate but it displays true or false. Suggestions please.

/**
     * @return         


        
5条回答
  •  清酒与你
    2021-01-17 03:13

    public String translate(boolean trueOrFalse) {       
        if(pback == true) ...
    

    Should probably be:

    public String translate(boolean trueOrFalse) {       
        if(trueOrFalse) ...
    

提交回复
热议问题