Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: Just a few basic questions

  1. #1
    Junior Member
    Join Date
    Mar 2014
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Just a few basic questions

    Ive been programming for about a couple of months now. All self taught. I'd probably consider myself as an intermediate/advanced Java programmer. But I still have some questions that I seem to never understand the answer.

    Firstly, one of my questions is... what is an object??? I cannot believe that I don't know what an object is despite me creating calculators, games, softwares that finds out a maths solution (I created my own SUVAT solver, for those of you who do mechanics will be familiar with this). Anyways yeah, I have no idea what an object is. I just know from instinct now when to create one and when to use one. The way I think of it is that it's like a key, its a key to access and use methods and variables from a different class. Would you agree to that definition? Ive searched online and ive been getting answers like 'it has a behaviour and a state' and sometimes people somehow bring animals in the definition of an object like, 'dog is an object, it has 2 ears and 4 legs' and I'm like... what are you on about?!

    Secondly, I have this idea for an android app but I'm not sure whether I am ready to try it out. It is pretty complex to make since one of its features is to send instant messages through the internet... and I dont think I know that much about networks. So are there any good videos/articles you can suggest for networking? (bare in mind im a complete noob when it comes to networking, i have no idea what a server is, socket, HTTP etc).

    Thirdly, what do these kind of statements mean:
    Socket socket = new Socket("google.com", 80);
    OutputStream out = socket.getOutputStream();

    I understand the part where socket is an object of the Socket class but I dont really understand the second line where out = socket.getOutputStream();. Does this tell the computer to get the value of socket.getOutputStream and make that equal to the out object? And by doing that, is the object out a constant? E.g. has its value been finalized to socket.getOutputSteam?

    Thanks for your help guys. Im new around here and hopefully I'll be around for more.


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Just a few basic questions

    Answers to these questions will reveal themselves to you as you study Java or most any OOP language from the ground up. There are no shortcuts, and providing answers to the questions you have (like, an Object is an instance of a class) will not give you the understanding you need.

    Start at the beginning and study. No, you're not ready to begin programming the Android app you've imagined.

  3. #3
    Junior Member
    Join Date
    Mar 2014
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Just a few basic questions

    then can you at least give me the answer to my third question??

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Just a few basic questions

    Have you read the API doc for the Socket class? What part of the doc are you having problems with? Copy the text of the doc here and ask your questions about what you are having problems with.

    I assume that you know what a constructor is and what an assignment statement does.
    If you don't understand my answer, don't ignore it, ask a question.

  5. #5
    Junior Member
    Join Date
    Mar 2014
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Just a few basic questions

    Quote Originally Posted by tloz View Post
    Ive been programming for about a couple of months now. All self taught. I'd probably consider myself as an intermediate/advanced Java programmer. But I still have some questions that I seem to never understand the answer.

    Firstly, one of my questions is... what is an object??? I cannot believe that I don't know what an object is despite me creating calculators, games, softwares that finds out a maths solution (I created my own SUVAT solver, for those of you who do mechanics will be familiar with this).
    Thats pretty impressive actually, I guess I am the opposite, spent alot of time studying Java theories and concepts with little time actually "making stuff". I guess it proves any one can start on his own with no formal learning and be on his way to program.

    As for objects I would offer an explanation but as Greg said its probably better to learn it and related concepts together to have a more complete understanding, a half explanation might do more harm than good.

    Anyway good luck.
    Last edited by Camaran; March 22nd, 2014 at 08:48 AM.

Similar Threads

  1. basic java questions
    By Prajwal Kumar in forum What's Wrong With My Code?
    Replies: 1
    Last Post: January 3rd, 2014, 04:48 AM
  2. List of my Java3D Questions, and Proguard questions
    By Zachary1234 in forum Java SE APIs
    Replies: 0
    Last Post: November 16th, 2012, 09:40 PM
  3. [SOLVED] Some serious questions,
    By Time in forum What's Wrong With My Code?
    Replies: 3
    Last Post: May 17th, 2010, 02:52 AM
  4. Few very basic Java questions.
    By 01001010 in forum Java Theory & Questions
    Replies: 2
    Last Post: February 13th, 2010, 01:14 PM
  5. Some basic questions.
    By trips in forum Java Theory & Questions
    Replies: 5
    Last Post: July 21st, 2009, 02:15 AM