From: shaik farooq Date: 2013-04-30T20:27:15+09:00 Subject: Re: BEGINNER -CLASS QUERY tamouse mailing lists wrote in post #1107282: > On Apr 29, 2013 12:17 PM, "shaik farooq" wrote: >> >> So in ruby we dont declare the instance variables in class for instances >> of class. > > When you say "declare", what is it you actually mean? "Declare" to me > means > "declare what type a variable is" and that makes no sense in Ruby. > > You can define instance (preceeded by @) and class (preceede by @@) > variables in a class, but that is not "declaring" them. Here u go "GEEK" Generally in java class e { int a; int add(){} } //main method e f=new e(); now the instance of "e" ie "f" will contain the copy of instance variables but in RUBY class e def method end end f=e.new() now the instance of "e" ie "f" will contain the instance variables which are not defined in class i just want to have clarity on it And moreover coming to u r language defition yeah my doubt is related to "Defining" not "declaration" -- Posted via http://www.ruby-forum.com/.