Page 1 of 2 12 LastLast
Results 1 to 20 of 35
Like Tree2Likes

Thread: Finding it difficult to understand java

  1. #1
    Gousia is offline Member
    Join Date
    Feb 2011
    Posts
    38
    Rep Power
    0

    Default Finding it difficult to understand java

    Hi Experts,

    I don't know why from past one week i am struggling with understanding the Generics in java.
    Could you please suggest some good tutorials that are easy to learn and that can help me to understand the Generics in a more easy way--

    I have consulted some standard tutorials like the ones provided by oracle.com but some how i am not getting comfortable with Generics
    [URL="http://download.oracle.com/javase/tutorial/java/generics/index.html"]
    i have provided the link that i used to get the tutorials


    Another thing i want to know is that i want to create my website.. What are the technologies i need to know to create my own website from scratch


    Hope i am not asking too many things
    Waiting for the expert advice


    Thanks & Regards,
    Gousia

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,013
    Rep Power
    10

    Default

    What are you having trouble understanding? Do you understand the basics? Is there a particular concept you're having trouble with? Do you have any code that you don't understand?
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Dark's Avatar
    Dark is offline Senior Member
    Join Date
    Apr 2011
    Location
    Camp Lejuene, North Carolina
    Posts
    643
    Rep Power
    4

    Default

    To create a website essentially you need to know HTML. Other things to know when developing websites can include but are not limited to CSS, XML, XHTML, PHP, JavaScript, Flash, Silverlight, and MySql.

    One question however, what are you trying to accomplish with Java? You are asking about two completely different fields and mastering both will be a challenge in itself.
    • Use [code][/code] tags when posting code. That way people don't want to stab their eyes out when trying to help you.
    • +Rep people for helpful posts.

  4. #4
    Joel's Avatar
    Joel is offline Member
    Join Date
    May 2011
    Location
    Placerville, CA
    Posts
    86
    Rep Power
    0

    Default

    I myself sometimes find certain concepts about java confusing (like packages, how to connect a MySql driver, turn my application into an applet, etc. I can definitely recommend Java for Dummies (no joke) 9 Books in One by Doug Lowe. He is very clear about most things, and the book is a wonderful resource to have in your bookshelf.

  5. #5
    Gousia is offline Member
    Join Date
    Feb 2011
    Posts
    38
    Rep Power
    0

    Default

    Thanks for the reply--

    The only thing i have understood is that we use generics to have different types of data stored in a single memory location-- After that what ever is the syntax defined i can't understand what is going on

  6. #6
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,800
    Rep Power
    7

    Default

    Repeating what someone else said: post an example of code which you do not understand.

  7. #7
    Gousia is offline Member
    Join Date
    Feb 2011
    Posts
    38
    Rep Power
    0

    Default

    Thanks Dark for the reply-

    My only problem is that i want to excel in java -- This is not by wish but now it is my necessity--
    For that i want to create some thing---

  8. #8
    Gousia is offline Member
    Join Date
    Feb 2011
    Posts
    38
    Rep Power
    0

    Default

    what is this --Improving the world one idiot at a time--???????

  9. #9
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,800
    Rep Power
    7

    Default

    Its just a bit of humour. Laugh a little.

  10. #10
    Gousia is offline Member
    Join Date
    Feb 2011
    Posts
    38
    Rep Power
    0

    Default

    Ohh!!! I thought not understanding java means that i am an idiot

  11. #11
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,455
    Rep Power
    20

    Default

    Quote Originally Posted by Gousia View Post
    The only thing i have understood is that we use generics to have different types of data stored in a single memory location
    No, that's one of the many things you've misunderstood.

    db

  12. #12
    Gousia is offline Member
    Join Date
    Feb 2011
    Posts
    38
    Rep Power
    0

    Default

    public class Box<T>
    {

    private T t;

    public void add(T t)
    {
    this.t = t;
    }

    public T get() {
    return t;
    }

    public <U> void inspect(U u){
    System.out.println("T: " + t.getClass().getName());
    System.out.println("U: " + u.getClass().getName());
    }

    public static void main(String[] args) {
    Box<Integer> integerBox = new Box<Integer>();
    integerBox.add(new Integer(10));
    integerBox.inspect("some text");
    }
    }

    Though i haven't understood much but this peice of code si going completely out of my mind

  13. #13
    Gousia is offline Member
    Join Date
    Feb 2011
    Posts
    38
    Rep Power
    0

    Default

    Crap!!!! So my basic understanding is also wrong

  14. #14
    Dark's Avatar
    Dark is offline Senior Member
    Join Date
    Apr 2011
    Location
    Camp Lejuene, North Carolina
    Posts
    643
    Rep Power
    4

    Default

    Do you have any understanding of any previous coding languages? Depending on the language it may help or hinder your learning process. I suggest you go back to chapter one, where you learn about the basics of Java. Why it was created, what it was intended to be used for and some simple theory. Once you understand what Java is supposed to do for you, then you will be able to understand more of how Java works.
    • Use [code][/code] tags when posting code. That way people don't want to stab their eyes out when trying to help you.
    • +Rep people for helpful posts.

  15. #15
    Gousia is offline Member
    Join Date
    Feb 2011
    Posts
    38
    Rep Power
    0

    Default

    I have done programming in C-- But that is quite easy then java i felt

  16. #16
    Dark's Avatar
    Dark is offline Senior Member
    Join Date
    Apr 2011
    Location
    Camp Lejuene, North Carolina
    Posts
    643
    Rep Power
    4

    Default

    I assume you mean C++, and you thought it was easier than Java?

    I question your credibility due to the fact that Java does a lot of the work for you when you run your code. The fact that it cleans up leaks, you don't have true pointers and the fact that its considered generally easier to learn than C++ is only a testament to my suspicions.

    However I will not call you a liar, and I will take a bite at your statement. Seeing as I also learned C++ before I learned Java, I will agree that it does take a little bit of work in getting used to the syntax. Now if you have learned C++, and you are trying to relate Java to C++ in its entirety of functionality you might want to take a look at this article: Differences between Java and C++ by Richard G Baldwin

    It does a pretty good job at explaining the major differences you are going to find. Aside from this, I can't really help you anymore unless you describe your problem in more detail.
    • Use [code][/code] tags when posting code. That way people don't want to stab their eyes out when trying to help you.
    • +Rep people for helpful posts.

  17. #17
    Gousia is offline Member
    Join Date
    Feb 2011
    Posts
    38
    Rep Power
    0

    Default

    Quote Originally Posted by Dark View Post
    I assume you mean C++, and you thought it was easier than Java?

    I question your credibility due to the fact that Java does a lot of the work for you when you run your code. The fact that it cleans up leaks, you don't have true pointers and the fact that its considered generally easier to learn than C++ is only a testament to my suspicions.

    However I will not call you a liar, and I will take a bite at your statement. Seeing as I also learned C++ before I learned Java, I will agree that it does take a little bit of work in getting used to the syntax. Now if you have learned C++, and you are trying to relate Java to C++ in its entirety of functionality you might want to take a look at this article: Differences between Java and C++ by Richard G Baldwin

    It does a pretty good job at explaining the major differences you are going to find. Aside from this, I can't really help you anymore unless you describe your problem in more detail.
    Nope i am talking about C only not C++

  18. #18
    Dark's Avatar
    Dark is offline Senior Member
    Join Date
    Apr 2011
    Location
    Camp Lejuene, North Carolina
    Posts
    643
    Rep Power
    4

    Default

    Ok then I misunderstood, unfortunately the -- in the forums doesn't auto mark itself into one solid line making a more distinguishable symbol.

    However my last sentence still stands. Unless you ask more detailed and specific questions then there isn't that much we can do to help you.
    • Use [code][/code] tags when posting code. That way people don't want to stab their eyes out when trying to help you.
    • +Rep people for helpful posts.

  19. #19
    Gousia is offline Member
    Join Date
    Feb 2011
    Posts
    38
    Rep Power
    0

    Default Type reference feature of Generics in Java

    Hi Experts,

    Can any explain me what is Type reference feature in Generics..

  20. #20
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default

    Can you show an example? Type is generally the type of some object, String, Scanner, Integer, etc.

Page 1 of 2 12 LastLast

Similar Threads

  1. Difficult Error
    By javaguy2010 in forum New To Java
    Replies: 4
    Last Post: 06-30-2010, 01:13 PM
  2. Replies: 20
    Last Post: 05-26-2010, 07:18 PM
  3. A difficult question
    By tyang in forum New To Java
    Replies: 2
    Last Post: 01-31-2010, 10:45 PM
  4. Difficult compilation
    By pochis40 in forum Java Applets
    Replies: 10
    Last Post: 12-21-2009, 01:35 PM
  5. Java's web world is really difficult..
    By jurka in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 09-02-2008, 06:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •