Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Isam Al-Abbasi
2,058 PointsStill confused about the use of Static keyword!! please explain furthermore.
I didn't get the part when Craig was explaining what the static method does and then he referred to the Integer.parseInt and he said it's start making sense now!! I was like "not to me it didn't :D" I'm also still confused about when do I use () or ; or {} after each line of code?
2 Answers

Piotr Stefański
3,080 PointsHi,
To be honest with you at the beginning I was also confused. So it is normal. But now I understand it as following. If you had two methods:
public int add(int a, int b){ return a+b; }
public static int add(int a, int b){ return a+b; }
Let's assume, that they are both contain in Example class in order to run first method without static keyword, you would need to create object of this class (Example exp = new Example()) and then use exp.add(5,2), in second definition of this method you don't need to create object of this class, instead of this you can write Example.add(5,2). Same thing will be with fields.
Is it more clear for you now?
Craig Dennis correct me if I am wrong.
Thanks

Isam Al-Abbasi
2,058 PointsHello Kristopher Van Sant thanks for reminding me as I forgot to do so. It really was a big help.
Happy coding for all of us :)

Kristopher Van Sant
Courses Plus Student 18,830 PointsNo problem at all! :)
Isam Al-Abbasi
2,058 PointsIsam Al-Abbasi
2,058 PointsThank you Piotr, well explained. I think I need to keep watching the videos and keep practicing and I hope things will become more clear by then.
I appreciate taking the time to answer my question.
Kristopher Van Sant
Courses Plus Student 18,830 PointsKristopher Van Sant
Courses Plus Student 18,830 PointsHey Isam Al-Abbasi! I'm so happy to see that Piotr was able to help you and answer your question! Why not go ahead and mark is his answer as "Best Answer". This will also help other students, who might have the same question as you, see that an answer was provided that helped you, meaning it will most likely help them too. Happy coding! And keep up the awesome work. :)