object(WP_Post)#1729 (24) {
  ["ID"]=>
  int(736)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2024-06-14 11:18:45"
  ["post_date_gmt"]=>
  string(19) "2024-06-14 11:18:45"
  ["post_content"]=>
  string(1525) "








Stack例子:

import java.util.Stack;

public class Example6 {
	public static void main(String args[]) {
		Stack<String> s = new Stack();
		s.add("A");
		s.add("B");
		s.add("C");

		s.remove(1);
		System.out.println(s.size());

		System.out.println(s.pop());
		if (!s.empty()) {
			System.out.println(s.pop());
		}
		System.out.println(s.pop());
		if (!s.empty()) {
			System.out.println(s.pop());
		}
	}
}
" ["post_title"]=> string(43) "Java第6堂: Data Structure & OOP again" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string(4) "open" ["ping_status"]=> string(4) "open" ["post_password"]=> string(0) "" ["post_name"]=> string(13) "java-lesson-6" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2024-06-15 06:06:22" ["post_modified_gmt"]=> string(19) "2024-06-15 06:06:22" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(0) ["guid"]=> string(29) "https://www.hkprog.org/?p=736" ["menu_order"]=> int(0) ["post_type"]=> string(4) "post" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" }
Java第6堂: Data Structure & OOP again
Stack例子: https://www.hkprog.org/2023/12/mccode/

Stack例子:

import java.util.Stack;

public class Example6 {
	public static void main(String args[]) {
		Stack<String> s = new Stack();
		s.add("A");
		s.add("B");
		s.add("C");

		s.remove(1);
		System.out.println(s.size());

		System.out.println(s.pop());
		if (!s.empty()) {
			System.out.println(s.pop());
		}
		System.out.println(s.pop());
		if (!s.empty()) {
			System.out.println(s.pop());
		}
	}
}
			object(WP_Post)#1708 (24) {
  ["ID"]=>
  int(721)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2024-06-07 16:20:13"
  ["post_date_gmt"]=>
  string(19) "2024-06-07 16:20:13"
  ["post_content"]=>
  string(1946) "








功課一 : 改下段Bubble Sort Code令到佢唔好Loop咁多次

功課二:將下面張圖轉成Code

" ["post_title"]=> string(45) "Java第5堂: Sorting & OOP(Class, Object)" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string(4) "open" ["ping_status"]=> string(4) "open" ["post_password"]=> string(0) "" ["post_name"]=> string(13) "java-lesson-5" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2024-06-07 16:25:25" ["post_modified_gmt"]=> string(19) "2024-06-07 16:25:25" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(0) ["guid"]=> string(29) "https://www.hkprog.org/?p=721" ["menu_order"]=> int(0) ["post_type"]=> string(4) "post" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" }
Java第5堂: Sorting & OOP(Class, Object)
功課一 : 改下段Bubble Sort Code令到佢唔好Loop咁多次 功課二:將下面張圖轉成Code https://www.hkprog.org/2023/12/mccode/

功課一 : 改下段Bubble Sort Code令到佢唔好Loop咁多次

功課二:將下面張圖轉成Code

			object(WP_Post)#1829 (24) {
  ["ID"]=>
  int(702)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2024-05-31 14:59:02"
  ["post_date_gmt"]=>
  string(19) "2024-05-31 14:59:02"
  ["post_content"]=>
  string(899) "





"
  ["post_title"]=>
  string(29) "Java第4堂: Array & Loop"
  ["post_excerpt"]=>
  string(0) ""
  ["post_status"]=>
  string(7) "publish"
  ["comment_status"]=>
  string(4) "open"
  ["ping_status"]=>
  string(4) "open"
  ["post_password"]=>
  string(0) ""
  ["post_name"]=>
  string(34) "java%e7%ac%ac4%e5%a0%82-array-loop"
  ["to_ping"]=>
  string(0) ""
  ["pinged"]=>
  string(0) ""
  ["post_modified"]=>
  string(19) "2024-05-31 15:02:22"
  ["post_modified_gmt"]=>
  string(19) "2024-05-31 15:02:22"
  ["post_content_filtered"]=>
  string(0) ""
  ["post_parent"]=>
  int(0)
  ["guid"]=>
  string(29) "https://www.hkprog.org/?p=702"
  ["menu_order"]=>
  int(0)
  ["post_type"]=>
  string(4) "post"
  ["post_mime_type"]=>
  string(0) ""
  ["comment_count"]=>
  string(1) "0"
  ["filter"]=>
  string(3) "raw"
}
		
Java第4堂: Array & Loop
https://www.hkprog.org/2023/12/mccode/
			object(WP_Post)#1726 (24) {
  ["ID"]=>
  int(688)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2024-05-24 15:04:17"
  ["post_date_gmt"]=>
  string(19) "2024-05-24 15:04:17"
  ["post_content"]=>
  string(1733) "








功課一

功課二

" ["post_title"]=> string(21) "Java第3堂: For Loop" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string(4) "open" ["ping_status"]=> string(4) "open" ["post_password"]=> string(0) "" ["post_name"]=> string(32) "java%e7%ac%ac3%e5%a0%82-for-loop" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2024-05-24 15:09:02" ["post_modified_gmt"]=> string(19) "2024-05-24 15:09:02" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(0) ["guid"]=> string(29) "https://www.hkprog.org/?p=688" ["menu_order"]=> int(0) ["post_type"]=> string(4) "post" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" }
Java第3堂: For Loop
功課一 功課二 https://www.hkprog.org/2023/12/mccode/

功課一

功課二

			object(WP_Post)#1831 (24) {
  ["ID"]=>
  int(679)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2024-05-17 17:15:08"
  ["post_date_gmt"]=>
  string(19) "2024-05-17 17:15:08"
  ["post_content"]=>
  string(1446) "








練習

public class Example1{
	public static void main(String args[]){
		int score=55;

		if (score >= 80){
			System.out.println("A");
		}else if (score >= 60){
			System.out.println("B");
		}else if (score >= 40){
			System.out.println("C");
		}else{
			System.out.println("F");
		}

		System.out.println("End");
	}
}
" ["post_title"]=> string(33) "Java第2堂 : Variable & Loop" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string(4) "open" ["ping_status"]=> string(4) "open" ["post_password"]=> string(0) "" ["post_name"]=> string(6) "java-2" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2024-05-18 03:51:14" ["post_modified_gmt"]=> string(19) "2024-05-18 03:51:14" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(0) ["guid"]=> string(29) "https://www.hkprog.org/?p=679" ["menu_order"]=> int(0) ["post_type"]=> string(4) "post" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" }
Java第2堂 : Variable & Loop
練習 https://www.hkprog.org/2023/12/mccode/

練習

public class Example1{
	public static void main(String args[]){
		int score=55;

		if (score >= 80){
			System.out.println("A");
		}else if (score >= 60){
			System.out.println("B");
		}else if (score >= 40){
			System.out.println("C");
		}else{
			System.out.println("F");
		}

		System.out.println("End");
	}
}
			object(WP_Post)#1828 (24) {
  ["ID"]=>
  int(641)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2024-05-10 16:51:25"
  ["post_date_gmt"]=>
  string(19) "2024-05-10 16:51:25"
  ["post_content"]=>
  string(5935) "




PowerPoint

Notes

  1. 下載Java https://java.sun.com
  1. 以下是HelloWorld代碼
class Example1{
    public static void main(String args[]){
          System.out.println("Hello World");
    }
}

Compile指令

javac Example1.java
java Example1

常見錯誤

錯誤一 : 打錯字

首先打錯字唔洗驚, 睇下個Error Message, 佢會有個箭咀指住大約錯邊個位, 同埋有個行數, 跟住就可以揾到錯邊

錯誤二: Save錯文件名

錯誤張文件名Save做.java.txt, 所有Java文件必需要用.java做尾. 你地係notebook到要簡下面嘅撰項

" ["post_title"]=> string(12) "Java 第1堂" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string(4) "open" ["ping_status"]=> string(4) "open" ["post_password"]=> string(0) "" ["post_name"]=> string(6) "java-1" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2024-05-13 09:00:19" ["post_modified_gmt"]=> string(19) "2024-05-13 09:00:19" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(0) ["guid"]=> string(29) "https://www.hkprog.org/?p=641" ["menu_order"]=> int(0) ["post_type"]=> string(4) "post" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" }
Java 第1堂
PowerPoint Notes Compile指令 javac Example1.javajava Example1 常見錯誤 錯誤一 : 打錯字 首先打錯字唔洗驚, 睇下個Error Message, 佢會有個箭咀指住大約錯邊個位, 同埋有個行數, 跟住就可以揾到錯邊 錯誤二: Save錯文件名 錯誤張文件名Save做.java.txt, 所有Java文件必需要用.java做尾. 你地係notebook到要簡下面嘅撰項 https://www.hkprog.org/2023/12/mccode/

PowerPoint

Notes

  1. 下載Java https://java.sun.com
  1. 以下是HelloWorld代碼
class Example1{
    public static void main(String args[]){
          System.out.println("Hello World");
    }
}

Compile指令

javac Example1.java
java Example1

常見錯誤

錯誤一 : 打錯字

首先打錯字唔洗驚, 睇下個Error Message, 佢會有個箭咀指住大約錯邊個位, 同埋有個行數, 跟住就可以揾到錯邊

錯誤二: Save錯文件名

錯誤張文件名Save做.java.txt, 所有Java文件必需要用.java做尾. 你地係notebook到要簡下面嘅撰項

			object(WP_Post)#1827 (24) {
  ["ID"]=>
  int(629)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2024-04-09 09:11:48"
  ["post_date_gmt"]=>
  string(19) "2024-04-09 09:11:48"
  ["post_content"]=>
  string(1727) "

Get in HKPS website, you see "Hour Of Code" menu on top

If you are not registered yet, you jump in above page. Two options: register for teen or adult

This is the main screen, since we don't have many courses yet, so no search bar. "On going" means the course still has lessons, you may ask teacher questions. "Done" means the course is ended, no question to teacher.

View course info and video play back

" ["post_title"]=> string(21) "HOC system proposal 1" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string(4) "open" ["ping_status"]=> string(4) "open" ["post_password"]=> string(0) "" ["post_name"]=> string(21) "hoc-system-proposal-1" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2024-04-09 09:17:27" ["post_modified_gmt"]=> string(19) "2024-04-09 09:17:27" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(0) ["guid"]=> string(29) "https://www.hkprog.org/?p=629" ["menu_order"]=> int(0) ["post_type"]=> string(4) "post" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" }
HOC system proposal 1
Get in HKPS website, you see “Hour Of Code” menu on top If you are not registered yet, you jump in above page. Two options: register for teen or adult This is the main screen, since we don’t have many courses yet, so no search bar. “On going” means the course still has lessons, you […] https://www.hkprog.org/2023/12/mccode/

Get in HKPS website, you see "Hour Of Code" menu on top

If you are not registered yet, you jump in above page. Two options: register for teen or adult

This is the main screen, since we don't have many courses yet, so no search bar. "On going" means the course still has lessons, you may ask teacher questions. "Done" means the course is ended, no question to teacher.

View course info and video play back

			object(WP_Post)#1826 (24) {
  ["ID"]=>
  int(532)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2024-02-23 16:49:19"
  ["post_date_gmt"]=>
  string(19) "2024-02-23 16:49:19"
  ["post_content"]=>
  string(454) "

Lunch with Thei and Microsoft to discuss the project about the AI platform

" ["post_title"]=> string(29) "Lunch with Thei and Microsoft" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string(4) "open" ["ping_status"]=> string(4) "open" ["post_password"]=> string(0) "" ["post_name"]=> string(29) "lunch-with-thei-and-microsoft" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2024-02-23 16:52:18" ["post_modified_gmt"]=> string(19) "2024-02-23 16:52:18" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(0) ["guid"]=> string(29) "https://www.hkprog.org/?p=532" ["menu_order"]=> int(0) ["post_type"]=> string(4) "post" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" }
Lunch with Thei and Microsoft
Lunch with Thei and Microsoft to discuss the project about the AI platform https://www.hkprog.org/2023/12/mccode/

Lunch with Thei and Microsoft to discuss the project about the AI platform

			object(WP_Post)#1825 (24) {
  ["ID"]=>
  int(334)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2023-12-13 05:59:38"
  ["post_date_gmt"]=>
  string(19) "2023-12-13 05:59:38"
  ["post_content"]=>
  string(2149) "

McCode is a weekly event for coding enthusiasts who want to share their passion, learn new skills, and enjoy some delicious food. Every week, we meet at a local McDonald’s restaurant and work on different coding projects, challenges, and tutorials. Whether you are a beginner or an expert, you are welcome to join us and have fun with coding. McCode is a great opportunity to network with other coders, get feedback on your work, and discover new tools and resources. Plus, you get to enjoy some tasty burgers, fries, and drinks while you code. What’s not to love? If you are interested in joining McCode, please visit our website and sign up for our newsletter. We hope to see you soon at McCode, the coding event that satisfies your hunger for learning and eating.

" ["post_title"]=> string(6) "McCode" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string(4) "open" ["ping_status"]=> string(4) "open" ["post_password"]=> string(0) "" ["post_name"]=> string(6) "mccode" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2023-12-15 07:34:05" ["post_modified_gmt"]=> string(19) "2023-12-15 07:34:05" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(0) ["guid"]=> string(29) "https://www.hkprog.org/?p=334" ["menu_order"]=> int(0) ["post_type"]=> string(4) "post" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" }
McCode
McCode is a weekly event for coding enthusiasts who want to share their passion, learn new skills, and enjoy some delicious food. Every week, we meet at a local McDonald’s restaurant and work on different coding projects, challenges, and tutorials. Whether you are a beginner or an expert, you are welcome to join us and […] https://www.hkprog.org/2023/12/mccode/

McCode is a weekly event for coding enthusiasts who want to share their passion, learn new skills, and enjoy some delicious food. Every week, we meet at a local McDonald’s restaurant and work on different coding projects, challenges, and tutorials. Whether you are a beginner or an expert, you are welcome to join us and have fun with coding. McCode is a great opportunity to network with other coders, get feedback on your work, and discover new tools and resources. Plus, you get to enjoy some tasty burgers, fries, and drinks while you code. What’s not to love? If you are interested in joining McCode, please visit our website and sign up for our newsletter. We hope to see you soon at McCode, the coding event that satisfies your hunger for learning and eating.

			object(WP_Post)#1803 (24) {
  ["ID"]=>
  int(311)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2023-12-01 16:16:42"
  ["post_date_gmt"]=>
  string(19) "2023-12-01 16:16:42"
  ["post_content"]=>
  string(2865) "

Thank you someone for providing us with the venue (we can't disclose his name). The workshop is very hands-on and everyone gets their first feeling to code the FPGA.

" ["post_title"]=> string(24) "FGPA Workshop 2023/12/01" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string(4) "open" ["ping_status"]=> string(4) "open" ["post_password"]=> string(0) "" ["post_name"]=> string(24) "fgpa-workshop-2023-12-01" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2023-12-13 05:54:59" ["post_modified_gmt"]=> string(19) "2023-12-13 05:54:59" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(0) ["guid"]=> string(29) "https://www.hkprog.org/?p=311" ["menu_order"]=> int(0) ["post_type"]=> string(4) "post" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" }
FGPA Workshop 2023/12/01
Thank you someone for providing us with the venue (we can’t disclose his name). The workshop is very hands-on and everyone gets their first feeling to code the FPGA. https://www.hkprog.org/2023/12/mccode/

Thank you someone for providing us with the venue (we can't disclose his name). The workshop is very hands-on and everyone gets their first feeling to code the FPGA.