• Post Reply Bookmark Topic Watch Topic
  • New Topic

looking for pratical sort of learning  RSS feed

 
lalit khera
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friends.

Thnks to all of them who are a part of this community for sharing their knowledge.
Now i want to ask a problem that may be actually a problem for most of the java beginners.

I am reading head first java. a nice book, no doubt. i am getting the code understanding from that.
But the problem is that i want to have practical implementations of this sample codes that i am learning.
that is. for example i learn abt instanceof operator in java , ok fine i know what it does(it specifies whether the object/instance is of specified type or not).
But i want to know the use of this operator in real time projects.
I am just taking an example of instanceof operator. i need to explore all the stuff that i am leaning from the book in more practical manner.

Means i want to do it more practically.
May be through case studies.
could anyone help me.
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
lalit khera wrote:...for example i learn abt instanceof operator in java , ok fine i know what it does(it specifies whether the object/instance is of specified type or not).
But i want to know the use of this operator in real time projects.

Well (and I'll probably get flak for this, but) the commonest use I know of for the instanceof operator is in equals() methods; so why not create a few classes (and, more especially, some class hierarchies) and write equals() methods for them? You might also discover some of the problems involved in writing a good equals() method while you're at it.

I am just taking an example of instanceof operator. i need to explore all the stuff that i am leaning from the book in more practical manner.

Find something that interests you and tackle it as a project; but don't go too fast.

We get tons of queries from beginners here of the sort: "I want to create a chat room in Java - How do I start?" - and the simplest answer is "read the tutorials".

Programming something like a chat room is a huge undertaking. I've been programming for 35 years (11 with Java) and it would probably take me a month.

Find something appropriate to your level - perhaps a simple game - to begin with, and build on your knowledge gradually. ie, Dont try chess as your first project.

You may also find this article useful.

HIH

Winston
 
Campbell Ritchie
Marshal
Posts: 56536
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, if you search with the search link above, you find that sort of question is asked all the time. Try here, for example, where somebody is asking the same sort of thing.
 
lalit khera
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Winston Gutkowski wrote:
lalit khera wrote:...for example i learn abt instanceof operator in java , ok fine i know what it does(it specifies whether the object/instance is of specified type or not).
But i want to know the use of this operator in real time projects.

Well (and I'll probably get flak for this, but) the commonest use I know of for the instanceof operator is in equals() methods; so why not create a few classes (and, more especially, some class hierarchies) and write equals() methods for them? You might also discover some of the problems involved in writing a good equals() method while you're at it.

I am just taking an example of instanceof operator. i need to explore all the stuff that i am leaning from the book in more practical manner.

Find something that interests you and tackle it as a project; but don't go too fast.

We get tons of queries from beginners here of the sort: "I want to create a chat room in Java - How do I start?" - and the simplest answer is "read the tutorials".

Programming something like a chat room is a huge undertaking. I've been programming for 35 years (11 with Java) and it would probably take me a month.

Find something appropriate to your level - perhaps a simple game - to begin with, and build on your knowledge gradually. ie, Dont try chess as your first project.

You may also find this article useful.

HIH

Winston



thnks mr. winston for your reply.

i agree with you what you have written.
Well i am a new bee in java but i dont want to rush in such a way that after reading few months i feel irritated and want to quit from it.
My aim of asking this question(related to practical sort of programming) is that i want to develop simple applications that will use what i am learning in java.
Initially i am not looking for big applications like gaming, chatting etc. that will require more concepts from java.
My objective is to use what i am learning in a more practical way.
It does not matter about the applications , the application may be calculating average of marks for 10 students , but it allow me to put the concepts that i am learning in that.
Again i am saying i dont want to rush. i want to learn, visualise java.

thnks
 
Campbell Ritchie
Marshal
Posts: 56536
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The instanceof operator works reliably in equals() methods if the equals() method is inside a final class, or one that cannot be subclassed for some other reason.
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:The instanceof operator works reliably in equals() methods if the equals() method is inside a final class, or one that cannot be subclassed for some other reason.

Or the equals() method itself is final.

Winston
 
Campbell Ritchie
Marshal
Posts: 56536
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I forgot that bit.
 
Raghav Viswanathan
Greenhorn
Posts: 26
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Lalit,

A warm welcome to Java. Hope your journey towards mastering Java is still on its course. Most of the terms or keywords that Java has is synonymous to english meanings. I would actually anyday bet on Sun's Java tutorial which can be found http://docs.oracle.com/javase/tutorial/java/index.html. This tutorial would cover all/most of the topics. As you start learning a concept say for example Interfaces and Inheritence, you can/must search the net for articles related to it and subsequently try and understand few examples. You would come up with a huge list of doubts, queries and you can post them here. There are lots of geniuses on this forum and they would be more than happy to help you out. This way you would make your learning stuctured and fun filled.

Lastly, Head first is an awesome book first up, do have that as a reference but you would have to practice a lot more with examples on the internet. You could also download some interesting open source projects and try to understand why people have coded in a certain way. If you could not find an answer you can always post them here . Happy Learning.

Thanks and regards,
Raghav.V
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!