I red the following statement the other day:
>An object has a state that can be represented in a state diagram<
I don't understand what a state diagram is, or how it can represent an object's...
Type: Posts; User: wamidh
I red the following statement the other day:
>An object has a state that can be represented in a state diagram<
I don't understand what a state diagram is, or how it can represent an object's...
okay, thank you.
I tried that out but then it said cannot make static reference to non-static method duck() from the type Wamidh.
Then I changed the duck function to static and then it worked!
I don't know if it's...
oh, thank you but what do I write to call my function duck?
I am meant to call my function? how do I do this?
thank you for your reply.
it won't say eric when I click run
public class Wamidh {
public static void main(String[] args) {
// TODO Auto-generated method stub
}
public void duck(){
String yellow = "eric";
System.out.println("" + yellow);
}
I don't understand why this won't work? thank you.
public void duck(){
String yellow = "eric";
System.out.println("" + yellow);
}
I don't know what happened to it >.> The file just won't open. Oh well, if I come across the same problem I will come back to this thread. Thank you anyways guys.
thank you Greg. I'm just trying to figure out why one of my methods don't work when I run the programme.
Is it possible to have multiple methods in one class?
And can I use the Scanner in methods other than the main method?
Many thanks
thank you everybody!
oh. how do I use close()
do I type in close(input1) ;
thank you Cornix
--- Update ---
ah, thank you Ada
Thank you Cornix.
I actually just ended up converted local variable to field. It fixed the problem, but I have no idea why this fixes the problem. Do you mind explaining please. thank you
what does this mean? and how do I fix this issue?
resource leak:'input1' is never closed
many thanks.