When I type
int a = 5;
Is a an object ?
Can anyone explain to me how in java every thing is an object?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Every object is a
java.lang.Object(NOTE:java.lang.Objecthas no super class. 😉 )However, there are many things which are not Objects.
Having a block of code as an object is one of the most exciting features in Java 8. The following examples will all be Closures and therefore objects.
e.g. the block of code here will be passed as a
RunnableObjecthttp://mail.openjdk.java.net/pipermail/lambda-dev/2011-September/003936.html