STUDENT! LOVE, CARE, and KEPO about TECHNOLOGY! WHAT ABOUT YOU?
RSS
content top

Basic About Programming 1



Monday, August 26th '13
Do all of you love monday?? Actually I love this monday . . .
(Is it important? Ok, it ISN'T!! Back to the main idea ^^!!)

Today, we (me and my friends in SEAMOLEC) taught about Programming ('again' for IT Education Student).
So why does it become so special?? Why I look so enthusiastic?
I don't know. There's nothing special, honestly. The differences just one, we SHOULD, MUST, HAVE TO, type our code on notepad. Netbean is prohibited!! Cos the true programmer use Notepad, that was Mr.Handy said. Even a hacker use notepad to write their program, Mr.Handy added more.

Ok, Alright, Fine!!
Use Notepad? Why not!!

Now, lets talk about the basic theory of Programming.
First, we talked about the difference between 'println', '\t', and '\n'
After do some analyzes, I can conclude that println (in syntax System.out.println) has the same function as '\n', for make a new line. The difference is,  use '\n' makes the source code look shorter. Look this picture :

public class Latihan
{
public static void main (String [] args)
{
/*
menggunakan print
*/
System.out.print("Nama Saya Desy");
System.out.print("Kuliah di Solo");
}
}
Berikut hasilnya: 

public class Latihan
{
public static void main (String [] args)
{
/*
menggunakan println
*/
System.out.println("Nama Saya Desy");
System.out.print("Kuliah di Solo");
}
}



public class Latihan
{
public static void main (String [] args)
{
/*
menggunakan \n
*/
System.out.print("Nama Saya Desy\nKuliah d");
}
}

Can you see that? By '\n', the source code is more shorter. We just need to write one 'System.out.println', but still can make a new paragraph.
Ok, just that for the first post. Find me on another time,palce, another time. :D
Last one, if you wanna ask something you may comment in these post, or find me on twitter, or blablabla
GBU

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 komentar:

Posting Komentar