CENG 104

traderainΛογισμικό & κατασκευή λογ/κού

15 Αυγ 2012 (πριν από 5 χρόνια και 2 μήνες)

220 εμφανίσεις

CENG 104

Lab #1


Q
1) Download and install Netbeans 6.8 from the
www.netbeans.org


Answer: Go to the website below, and view Introduction to Netbeans video.


http://www.deitel.com/Books/Java/JavaHowtoProgram8eEarlyObjectsVersion/tabid/3415
/Default.aspx


Go to the website below and read the following.


http://www.hrzafer.com/netbeans
-
ile
-
java
-
01
-
netbeans
-
il
e
-
uygulama
-
gelistirmeye
-
giris


Q2) Create a java application.


Answer:
Go to the website below and read the following.


http://www.hrzafer.com/netbeans
-
ile
-
java
-
02
-
hizli
-
bir
-
baslangic


Q3) Write a program that prints "
Hello, World
".


public

class

HelloWo
rld
{



public

static

void

main
(
String
[]

args
)

{


System
.
out
.
println
(
"Hello, World"
);


}


}


Q4) Write a program that prints "
Hello, World
" ten times.


public

class

TenHelloWorlds
{



public

static

void

main
(
String
[]

args
)

{


System
.
out
.
println
(
"Hello, World"
);


System
.
out
.
println
(
"Hello, World"
);


System
.
out
.
println
(
"Hello, World"
);


System
.
out
.
println
(
"Hello, World"
);


System
.
out
.
println
(
"Hello, World"
);


System
.
out
.
println
(
"Hello, World"
);



System
.
out
.
println
(
"Hello, World"
);


System
.
out
.
println
(
"Hello, World"
);


System
.
out
.
println
(
"Hello, World"
);


System
.
out
.
println
(
"Hello, World"
);


}


}


Q5)
Write a program that prints "Hi, yourname. How are you?" where "yourname"

is
replaced by the

argument.


public

class

UseArgument
{



public

static

void

main
(
String
[]

args
)

{


System
.
out
.
print
(
"Hi, "
);


System
.
out
.
print
(
args
[
0
]);


System
.
out
.
println
(
". How are you?"
);


}


}