Lab5-10 - Khoa Khoa hc K thut My tnh, trng i Hc Bch Khoa...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Khoa Khoa h c K thu t Máy tính, tr ng Đ i H c Bách Khoa – ĐHQG Tp.HCM ườ BÀI TH C HÀNH S 5-10 I. M c tiêu - Hi u bi t l p trình Java trên môi tr ng l p trình Eclipse. ế ậ ườ II. Các b c th c hi n ướ 1. B t đ u v i Eclipse ắ ầ - File -> New -> Java project -> myjavaprograms-> Finish - File -> New -> Class -> Welcome -> Ch n tùy ch n public static void main(String[] args) -> Finish Trang 1/5
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Khoa Khoa h c K thu t Máy tính, tr ng Đ i H c Bách Khoa – ĐHQG Tp.HCM ườ - Ta có giao di n nh sau: ư - System.out.println(“Welcome to Java”); vào trong main() - Compile -> Run 2. Bài t p a) In đ a ch IP c a localhost import java.net.*; public class HostInfo { public static void main(String args[]) { HostInfo host = new HostInfo(); host.init(); } public void init() { try { InetAddress myHost = InetAddress.getLocalHost(); System.out.println(myHost.getHostAddress());
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/25/2010 for the course INFORMATIO 506002 taught by Professor Nguyenducthai during the Winter '10 term at RMIT Vietnam.

Page1 / 5

Lab5-10 - Khoa Khoa hc K thut My tnh, trng i Hc Bch Khoa...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online