Hello all,
I was watching a Java tutorial on YouTube about variable arithmetic. So I thought I'd make a simple programm to take two variables and do arithmetic on them. So I declare an int variable x. Then this happens:
I hover the mouse and it says "Local variable x is never read". What is this?
I am using Eclipse for whatever it's worth.Code:publicclass Variable_Arithmetic { publicstaticvoid main(String[] args) { int x = 10; } }
Help would be great.
It's just a 'warning' probably because you declare x. But you don't do anything useful with it. If below you saythen it's most likely solved as eclipse notices that x is now used and useful in some way.Code:System.out.println(x);
Oh Thanks
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks