• Post Reply Bookmark Topic Watch Topic
  • New Topic

method or instance variable?  RSS feed

 
jon ninpoja
Ranch Hand
Posts: 291
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks norm...yes im going to start reading those tutorials first,think the book im reading is a little too advanced for me now.

on a different note norm...

if i have a class

public class myclass

and add a line just inside its {}

Scanner new userInput = new Scanner(system.in);

...is that a method...or an instance variable...im battling to understand the various components of classes etc etc...i guess i should really hit the oracle web site!
thanks




 
Norm Radder
Rancher
Posts: 2240
28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would suggest that you make a small simple skeleton of a program for test compiling code before posting it.  When you post invalid code it makes it hard for anyone to comment on your questions about the code unless your question is about the error message you are getting when you try to compile the code.  When you get compiler errors you are having problems with be sure to copy the full text of the error message and paste it here.

..is that a method
I'm not sure what the "that" is you are asking about.  Perhaps you could make the text bold that you are asking about.
See the tutorial about methods: http://docs.oracle.com/javase/tutorial/java/javaOO/methods.html

Here is a good link you should save so you can look up topics in the tutorial:  http://docs.oracle.com/javase/tutorial/reallybigindex.html
 
jon ninpoja
Ranch Hand
Posts: 291
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok norm will never do this again in future thanks
will write something and ask the relative questions

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!