TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mazetar
NA
6
11.9k
Classes "Dog dog = new Dog();" what dose this acctualy do?
Apr 29 2011 9:27 AM
For the example Dog is an class.
I have been wondering about the following lines of code:
Dog dog = new Dog();
in comparance to this code:
Dog dog;
dog = new Dog();
I'm not sure if I have understood all what I have read inn the books and articles I'm learning from but the
Dog dog;
is the same as declearing a variable like an int "int myInt;" it only creates a space inn memory to store such int,
or inn the case of the dog it creates a place to store a Dog instance and lables it "dog" so you can refer to that place as dog?
so when you do
dog = new Dog();
you actually give the dog the information of Dog?
can you only set it as new Dog or could I set it as a new of another class than dog?
Reply
Answers (
1
)
How we can bind dataset with axml file in vb.net?
TextBox Multi Undo/Redo Function