Sorry for the long hiatus, but I was really focused on Android these past couple of months, so I had nothing useful to write about. I do now, so here it is. I started with the Android developers website. While it’s really good, and you’ll still spend a lot of time reading the content there, it’s not really beginner-friendly. The […]
Android app development
I passed the exam!
I just took SCJP – or OCPJP if you prefer – earlier today and I scored 70%! It took me about an hour and a half to finish, about half the allowed time. I was going to go over my answers once more, but I just couldn’t resist the temptation of finishing early, specially that I was confident in most […]
Hello, World! in Java without main()
While I was reading the SCJP book, I came across the concept of initialization blocks, or init blocks for short. Those blocks of code get executed before any method code is executed. One kind of these blocks is static init blocks, those get executed immediately after the super constructor has finished execution. This made me think, “I could output text […]
Doing some coding
Today, I tried to write code that involves actual problem solving I wrote a method that calculates the factorial of a number, here’s how I did it : [sourcecode language=”java”] public static double calculate(int number){ if (number > 0){ int result = 1; for(int i = 1; i <= number; i++){ result *= i; } return result; } else if(number […]
Back to studying for OCPJP (formerly SCJP)
I have been studying for this exam on and off for a year now. I now know a lot about Java SE, and I’m somewhat ready for the exam, there are a few things that need revising. I’m currently using two books, this and this. I’ve read the first book many times, and I’m using the second one because it’s […]