Passing Variables between methods?

前端 未结 5 1812
情书的邮戳
情书的邮戳 2021-01-17 00:10

So im trying to write a simple java program for college and I\'m a complete newbie at this java stuff. I keep getting an error when I compile, \"error - could not find symbo

5条回答
  •  北荒
    北荒 (楼主)
    2021-01-17 00:45

    You aren't passing the variables, that's the problem. You declared them in main. However, if you declare them as static variables before the main method, that will work.

提交回复
热议问题