Java Virtual Machine (JVM)
Salah satu karakteristik bahasa pemrograman Java™ adalah , Platform Independent - tidak tergantung kepada sistem operasi atau mesin apa pun.
JVM adalah sebuah mesin virtual yang bekerja selayaknya sebuah mesin. JVM memiliki spesifikasi hardwarenya sendiri beserta platform yang dibutuhkan untuk melakukan kompilasi terhadap source code java. Setelah dikompilasi akan menghasilkan bytecode yang disebut berkestensi .class yang isinya menyerupai kode mesin. Kode mesin sendiri di terjemahkan oleh mesin dimana dia dijalankan, sedangkan bytecode Java diterjemahkan oleh JVM juga. Untuk menjalankan program Java komputer memerlukan JVM dan JVM dapat bekerja di platform apa saja. Selama memiliki JVM program Java dapat dijalankan tanpa memperhatikan platform. Sebab itulah Java memiliki sifat platform independent.
Struts Framework, Memberikan Segala Kemudahan (Struts Concept) - Part 2
Ok, ini bagian kedua, tapi tidak saya tulis langsung di dalam blog. Bisa di-download di
. Silahkan bro and sis di download.
Makasih udah mampir
Struts Framework, Memberikan Segala Kemudahan (Struts Concept) - Part 1

Struts
Tulisan ini ditujukan untuk para teman programmer java yang sudah paham dengan konsep MVC, pada khususnya dan untuk umat manusia yang berkenan membaca tulisan ini, pada umumnya. Akan lebih baik jika kita sudah memhami konsep MVC, dengan begitu kita juga sudah memahami istilah Controller yang ada dalam konsep MVC. Dimana Struts Framework bekerja di area Controller dalam sebuah aplikasi.
.::.
Aplikasi yang di rancang berdasarkan konsep MVC (Model View Controller) akan dibagi menjadi 3 bagian besar yaitu, Model - yang merepresentasikan object yang menjadi bagian dalam aplikasi secara keseluruhan, tetapi dengan tidak melupakan teori OOP tentunya. Yang kedua View - yang bekerja untuk menampilkan aplikasi melalui interface yang baik dan sesuai dan yang terakhir Controller - yang bekerja sebagai navigator menurut saya, dalam aplikasi. Singkat cerita, (more…)
How To Create New Object
First of all, for someone new with Java programming language must be have no idea what is “Object” term in the title means. Java programming language is Object Oriented Programming (OOP) base, it works like a real life in the world. So, what is the object in the real life? I’am an object, every people is object, your nokia N series is object, my SonyEricsson is object. We can say everything in our world is an object. There is higher level than object, that is Class and an object is representation of Class. This is my best analogy to describe the relation of class and object. In the real world, Human categorized as class and individu named Simon for example categorized as object. So let say that “Simon is an Object of Human Class“. Human typically has attributes such as two arms, two eyes, one nose, has hair and so on, so that Simon as an object of Human has them too.
In OOP also has Class and Object term and the relation between both of them already explained above. Simon in reality is God’s hand-made but sure Simon also can make his object to. Let say Simon is Java Programmer and he want to create an object. In Java language, to create an object you have to have a Class first, so Simon create his class named Human then he may start to create a new object from it. (more…)
Looping Technique For Collection
Take a look to the given array bellow:
int[] numbers = {1,2,3,4,5,6};
How you iterate that array? so the result of iteration will look like this:
This is number 1
This is number 2
This is number 3
..so on
This is old-style-for-loop that i use before, initialize counter, set up a terminating condition and describe how the counter may be increment. It’s classic but sometime we need it. It will be look like this:
package belajarjavadotcom.post.genericloop public class GenericLoop { int[] numbers = {1,2,3,4,5,6}; for(int i=0; i<numbers.length; i++) { } } }
Now, start from JDK 1.5 we can simply write a new-fashion-for-looping. We do not need to determine how many element in array before looping, we do not need to setting up termiating condition neither incremental value of the counter. It’s easy so take a look codes bellow: (more…)
Singleton Pattern
It’s often situation when we write an application code that is we need only one object for several class in an application. For example, an application that working with database should be has only one Database Connection, only one object shared throughout the application. For this case we need a class design pattern which create an object once and share an instance of the object across the entire application.
So, how to create an singleton class? before we write singleton class, let’s take a look to the class bellow, say MyConnection class:
package belajarjavadotcom.post.singleton; public class MyConnection { private static MyConnection connection = new MyConnection(); private MyConnection() { } public static MyConnection getConnection() { return connection; } }
We need to get connection object to create a connection to database, but connection field in MyConnection class has been set as private but it’s static. So, the only way get reference to MyConnection object is make a call to the static method, that is getConnection(). It will look like this
MyConnection.getConnection();
This is the problem, when client calls MyConnection.getConnection() multiple times. Every call of method, create new object of class. We do not wish it will work in that way. So to ensure that class does not create a new object and clients still use the same instance of object. (more…)
Java ► Object Oriented Programming language
Java is Object Oriented Programming language. If you just start learning java, your first step should be change your programming mindset from Structural to Object Oriented. This is simple because object oriented related with real life. In real life I am an object, i have an identities/attributes such as two eyes, two arm, one nose, etc. I also do some action like walking, writing and so on. Object oriented is working in that way. Java programming is not so hard to learned, we can learn from dozens of senior programmers out there, a milion tutorials and another source spread out in the internet. That you only need to do is, just find them.













