Today Task

Task:

  1. Create a class Called Player
  2. Have main method in it.
  3. Inside main method, create an instance(object) called ‘dhoni’.
  4. Using ‘dhoni’ reference, call a method called ‘batting(30)’
  5. From batting, return 100
  6. Store returned value as score.
  7. Print returned value in main method.

Input:

Output:

原文链接:Today Task

© 版权声明
THE END
喜欢就支持一下吧
点赞10 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容