{"id":9051,"date":"2023-10-23T16:40:22","date_gmt":"2023-10-23T09:40:22","guid":{"rendered":"https:\/\/teky.edu.vn\/blog\/?p=9051"},"modified":"2023-10-30T08:36:12","modified_gmt":"2023-10-30T01:36:12","slug":"static-trong-java","status":"publish","type":"post","link":"https:\/\/teky.edu.vn\/blog\/static-trong-java\/","title":{"rendered":"Static trong Java l\u00e0 g\u00ec? Nh\u1eefng th\u00f4ng tin c\u01a1 b\u1ea3n nh\u1ea5t v\u1ec1 Static 2021"},"content":{"rendered":"\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-left kksr-valign-top\"\n    data-payload='{&quot;align&quot;:&quot;left&quot;,&quot;id&quot;:&quot;9051&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;top&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;29&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;3.8&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;Rate this post&quot;,&quot;legend&quot;:&quot;3.8\\\/5 - (29 b\u00ecnh ch\u1ecdn)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;title&quot;:&quot;Static trong Java l\u00e0 g\u00ec? Nh\u1eefng th\u00f4ng tin c\u01a1 b\u1ea3n nh\u1ea5t v\u1ec1 Static 2021&quot;,&quot;width&quot;:&quot;107.7&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 107.7px;\">\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 19.2px;\">\n            3.8\/5 - (29 b\u00ecnh ch\u1ecdn)    <\/div>\n    <\/div>\n<p style=\"text-align: justify;\"><em>Static l\u00e0 m\u1ed9t trong nh\u1eefng t\u1eeb kh\u00f3a quan tr\u1ecdng c\u1ee7a Java. \u0110\u1ec3 l\u1eadp tr\u00ecnh t\u1ed1t, b\u1ea1n c\u1ea7n n\u1eafm ch\u1eafc kh\u00e1i ni\u1ec7m c\u1ee7a t\u1eeb kh\u00f3a Static c\u0169ng nh\u01b0 c\u00e1c d\u1ea1ng th\u1ec3 hi\u1ec7n v\u00e0 c\u00e1ch s\u1eed d\u1ee5ng c\u1ee7a n\u00f3. Static kh\u00f4ng g\u00e2y kh\u00f3 kh\u0103n cho ng\u01b0\u1eddi d\u00f9ng nh\u01b0ng l\u1ea1i \u0111\u00f2i h\u1ecfi b\u1ea1n ph\u1ea3i th\u1ea5u hi\u1ec3u ho\u00e0n to\u00e0n kh\u00e1i ni\u1ec7m c\u1ee7a n\u00f3 \u0111\u1ec3 c\u00f3 th\u1ec3 v\u1eadn d\u1ee5ng t\u1ed1t. V\u1edbi b\u00e0i vi\u1ebft sau \u0111\u00e2y, Teky gi\u00fap b\u1ea1n t\u00ecm hi\u1ec3u v\u1ec1 c\u00e1c th\u00f4ng tin v\u00e0 n\u1ed9i dung xung quanh t\u1eeb kh\u00f3a <strong>Static trong Java.<\/strong><\/em><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">N\u1ed9i dung <\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/teky.edu.vn\/blog\/static-trong-java\/#Khai_niem_cua_Static_trong_Java_la_gi\" >Kh\u00e1i ni\u1ec7m c\u1ee7a Static trong Java l\u00e0 g\u00ec?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/teky.edu.vn\/blog\/static-trong-java\/#Cau_truc_hoat_dong_cua_bien_Static_trong_Java\" >C\u1ea5u tr\u00fac ho\u1ea1t \u0111\u1ed9ng c\u1ee7a bi\u1ebfn Static trong Java<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/teky.edu.vn\/blog\/static-trong-java\/#Vi_du_ve_bien_Static_Class_trong_Java\" >V\u00ed d\u1ee5 v\u1ec1 bi\u1ebfn Static Class trong Java<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/teky.edu.vn\/blog\/static-trong-java\/#Luu_y_ve_phuong_thuc_Static_Java\" >L\u01b0u \u00fd v\u1ec1 ph\u01b0\u01a1ng th\u1ee9c Static Java<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/teky.edu.vn\/blog\/static-trong-java\/#Dac_diem_cua_phuong_thuc_Static_trong_Java\" >\u0110\u1eb7c \u0111i\u1ec3m c\u1ee7a ph\u01b0\u01a1ng th\u1ee9c Static trong Java<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/teky.edu.vn\/blog\/static-trong-java\/#Truong_hop_nen_su_dung_phuong_thuc_Static\" >Tr\u01b0\u1eddng h\u1ee3p n\u00ean s\u1eed d\u1ee5ng ph\u01b0\u01a1ng th\u1ee9c Static<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/teky.edu.vn\/blog\/static-trong-java\/#Vi_du_ve_phuong_thuc_Static_trong_Java\" >V\u00ed d\u1ee5 v\u1ec1 ph\u01b0\u01a1ng th\u1ee9c Static trong Java<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/teky.edu.vn\/blog\/static-trong-java\/#Ket_luan\" >K\u1ebft lu\u1eadn<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/teky.edu.vn\/blog\/static-trong-java\/#Hoc_vien_cong_nghe_Teky_la_noi_hoc_lap_trinh_hang_dau_Viet_Nam\" >H\u1ecdc vi\u1ec7n c\u00f4ng ngh\u1ec7 Teky l\u00e0 n\u01a1i h\u1ecdc l\u1eadp tr\u00ecnh h\u00e0ng \u0111\u1ea7u Vi\u1ec7t Nam<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/teky.edu.vn\/blog\/static-trong-java\/#Day_la_chuong_trinh_khong_chi_trang_bi_kien_thuc_lap_trinh_ma_con_ren_luyen_nhom_ky_nang_4Cs_Tre_se_duoc\" >\u0110\u00e2y l\u00e0 ch\u01b0\u01a1ng tr\u00ecnh kh\u00f4ng ch\u1ec9 trang b\u1ecb ki\u1ebfn th\u1ee9c l\u1eadp tr\u00ecnh m\u00e0 c\u00f2n r\u00e8n luy\u1ec7n nh\u00f3m k\u1ef9 n\u0103ng 4Cs. Tr\u1ebb s\u1ebd \u0111\u01b0\u1ee3c:<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/teky.edu.vn\/blog\/static-trong-java\/#Lien_he_ngay_hoc_vien_cong_nghe_sang_tao_TEKY_de_duoc_tu_van_khoa_hoc\" >Li\u00ean h\u1ec7 ngay h\u1ecdc vi\u1ec7n c\u00f4ng ngh\u1ec7 s\u00e1ng t\u1ea1o TEKY \u0111\u1ec3 \u0111\u01b0\u1ee3c t\u01b0 v\u1ea5n kh\u00f3a h\u1ecdc:<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Khai_niem_cua_Static_trong_Java_la_gi\"><\/span>Kh\u00e1i ni\u1ec7m c\u1ee7a Static trong Java l\u00e0 g\u00ec?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">\u0110\u1ea7u ti\u00ean, ta s\u1ebd t\u00ecm hi\u1ec3u \u0111\u00e1p \u00e1n cho c\u00e2u h\u1ecfi, Static l\u00e0 g\u00ec? V\u1ec1 c\u01a1 b\u1ea3n, t\u1eeb kh\u00f3a Static \u0111\u01b0\u1ee3c d\u00f9ng \u0111\u1ec3 qu\u1ea3n l\u00fd b\u1ed9 nh\u1edb m\u1ed9t c\u00e1ch c\u00f3 h\u1ec7 th\u1ed1ng h\u01a1n. Tuy nhi\u00ean, Static kh\u00f4ng th\u1ec3 qu\u1ea3n l\u00fd b\u1ed9 nh\u1edb c\u1ee7a \u0111\u1ed1i t\u01b0\u1ee3ng (hay c\u00f2n g\u1ecdi l\u00e0 th\u1ec3 hi\u1ec7n l\u1edbp) m\u00e0 ch\u1ec9 qu\u1ea3n l\u00fd b\u1ed9 nh\u1edb c\u1ee7a l\u1edbp th\u00f4i.<\/p>\n<p style=\"text-align: justify;\">Static c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c \u00e1p d\u1ee5ng v\u1edbi c\u00e1c bi\u1ebfn, c\u00e1c ph\u01b0\u01a1ng th\u1ee9c, c\u00e1c kh\u1ed1i ho\u1eb7c c\u00e1c l\u1edbp l\u1ed3ng nhau. Chi ti\u1ebft v\u1ec1 c\u00e1ch s\u1eed d\u1ee5ng Static nh\u01b0 sau:<\/p>\n<figure id=\"attachment_9056\" aria-describedby=\"caption-attachment-9056\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-9056\" src=\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/09\/tim-hieu-ve-static-trong-java.jpg\" alt=\"T\u00ecm hi\u1ec3u v\u1ec1 Static trong Java\" width=\"650\" height=\"400\" srcset=\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/09\/tim-hieu-ve-static-trong-java.jpg 650w, https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/09\/tim-hieu-ve-static-trong-java-400x246.jpg 400w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><figcaption id=\"caption-attachment-9056\" class=\"wp-caption-text\">T\u00ecm hi\u1ec3u v\u1ec1 Static trong Java<\/figcaption><\/figure>\n<ul style=\"text-align: justify;\">\n<li style=\"font-weight: 400;\" aria-level=\"1\">Bi\u1ebfn Static (Static Variables): Ta c\u00f3 th\u1ec3 th\u1ea5y r\u1eb1ng, Static d\u1ecbch ra l\u00e0 T\u0129nh. Ch\u00ednh v\u00ec v\u1eady, bi\u1ebfn Static hay \u0111\u01b0\u1ee3c g\u1ecdi l\u00e0 bi\u1ebfn t\u0129nh khi ta khai b\u00e1o ch\u00fang.<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\">Ph\u01b0\u1edbc th\u1ee9c Static (Static Methods): Khi ng\u01b0\u1eddi d\u00f9ng ti\u1ebfn h\u00e0nh khai b\u00e1o m\u1ed9t ph\u01b0\u01a1ng th\u1ee9c d\u01b0\u1edbi d\u1ea1ng Static th\u00ec n\u00f3 \u0111\u01b0\u1ee3c g\u1ecdi l\u00e0 ph\u01b0\u01a1ng th\u1ee9c Static.<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\">Kh\u1ed1i Static (Static Blocks): Khi mu\u1ed1n kh\u1edfi t\u1ea1o c\u00e1c th\u00e0nh vi\u00ean thu\u1ed9c nh\u00f3m d\u1eef li\u1ec7u Static, ta s\u1ebd ti\u1ebfn h\u00e0nh s\u1eed d\u1ee5ng kh\u1ed1i Static.<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\">L\u1edbp Static (Static Class): Ng\u01b0\u1eddi d\u00f9ng c\u00f3 th\u1ec3 \u0111\u1eb7t c\u00e1c l\u1edbp l\u1ed3ng nhau th\u00e0nh d\u1ea1ng Static. C\u00e1c l\u1edbp l\u1ed3ng nhau n\u00e0y c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c truy c\u1eadp m\u00e0 kh\u00f4ng c\u1ea7n \u0111\u1ebfn object c\u1ee7a c\u00e1c l\u1edbp b\u00ean ngo\u00e0i.<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\">Import Static: Ta \u0111\u01b0\u1ee3c ph\u00e9p ti\u1ebfn h\u00e0nh Import c\u00e1c Static Member c\u1ee7a m\u1ed9t l\u1edbp ho\u1eb7c m\u1ed9t package v\u00e0o m\u1ed9t l\u1edbp kh\u00e1c b\u1eb1ng ph\u01b0\u01a1ng th\u1ee9c s\u1eed d\u1ee5ng t\u1eeb kh\u00f3a Import v\u1edbi c\u00e1c phi\u00ean b\u1ea3n Java t\u1eeb 5 tr\u1edf l\u00ean. Sau \u0111\u00f3, ng\u01b0\u1eddi d\u00f9ng c\u00f3 th\u1ec3 v\u1eadn d\u1ee5ng Import Static \u0111\u00f3 nh\u01b0 m\u1ed9t th\u00e0nh vi\u00ean c\u1ee7a l\u1edbp.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/lotrinhlaptrinh.teky.vn\/?utm_id=ContentBlog&amp;utm_medium=Click_Blog&amp;utm_source=ContentBlog\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-22416\" src=\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2023\/10\/dang-ky-lap-trinh-teky.gif\" alt=\"dang-ky-lap-trinh\" width=\"600\" height=\"314\" \/><\/a><\/p>\n<p>&gt;&gt;&gt; xem th\u00eam <a href=\"https:\/\/teky.edu.vn\/blog\/jira-la-gi\/\">: <span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Jira l\u00e0 g\u00ec? T\u1ed5ng h\u1ee3p m\u1ed9t s\u1ed1 \u01b0u nh\u01b0\u1ee3c \u0111i\u1ec3m c\u1ee7a Jira&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:4480,&quot;10&quot;:2,&quot;11&quot;:0,&quot;15&quot;:&quot;Arial&quot;}\">Jira l\u00e0 g\u00ec? T\u1ed5ng h\u1ee3p m\u1ed9t s\u1ed1 \u01b0u nh\u01b0\u1ee3c \u0111i\u1ec3m c\u1ee7a Jira<\/span><\/a><\/p>\n<h2 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Cau_truc_hoat_dong_cua_bien_Static_trong_Java\"><\/span>C\u1ea5u tr\u00fac ho\u1ea1t \u0111\u1ed9ng c\u1ee7a bi\u1ebfn Static trong Java<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">Bi\u1ebfn Static c\u00f3 th\u1ec3 d\u00f9ng \u0111\u1ec3 ch\u1ec9 thu\u1ed9c t\u00ednh chung c\u1ee7a m\u1ed9t nh\u00f3m \u0111\u1ed1i t\u01b0\u1ee3ng ch\u1ee9 kh\u00f4ng ch\u1ec9 m\u1ed9t \u0111\u1ed1i t\u01b0\u1ee3ng ri\u00eang l\u1ebb. V\u00ed d\u1ee5, ta d\u00f9ng bi\u1ebfn Static \u0111\u1ec3 khai b\u00e1o t\u00ean c\u00f4ng ty c\u1ee7a m\u1ed9t nh\u00f3m nh\u00e2n vi\u00ean ho\u1eb7c t\u00ean tr\u01b0\u1eddng \u0111\u1ea1i h\u1ecdc c\u1ee7a m\u1ed9t nh\u00f3m sinh vi\u00ean. Trong khu v\u1ef1c class, bi\u1ebfn Static ch\u1ec9 nh\u1eadn b\u1ed9 nh\u1edb \u0111\u01b0\u1ee3c m\u1ed9t l\u1ea7n duy nh\u1ea5t t\u1ea1i th\u1eddi \u0111i\u1ec3m class loading.<\/p>\n<p style=\"text-align: justify;\">Bi\u1ebfn Static trong Java c\u00f2n c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c khai b\u00e1o \u0111\u1ed3ng th\u1eddi c\u00f9ng c\u00e1c t\u1eeb kh\u00f3a Static kh\u00e1c. Khi \u0111\u00f3, n\u00f3 \u0111\u01b0\u1ee3c g\u1ecdi l\u00e0 class variable. \u0110\u1ec3 ti\u1ebft ki\u1ec7m b\u1ed9 nh\u1edb h\u01a1n, bi\u1ebfn Static \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng nh\u01b0 m\u1ed9t thu\u1ed9c t\u00ednh chung c\u1ee7a t\u1ea5t c\u1ea3 c\u00e1c objects (ho\u1eb7c instances) trong l\u1edbp \u0111\u00f3. N\u00f3 c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c g\u1ecdi khi ch\u01b0a c\u1ea7n t\u1ea1o \u0111\u1ed1i t\u01b0\u1ee3ng n\u00e0o.<\/p>\n<figure id=\"attachment_9055\" aria-describedby=\"caption-attachment-9055\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-9055 size-full\" src=\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/09\/cac-buoc-hoat-dong-cua-static-trong-lop.jpg\" alt=\"C\u00e1c b\u01b0\u1edbc ho\u1ea1t \u0111\u1ed9ng c\u1ee7a Static trong l\u1edbp\" width=\"650\" height=\"400\" srcset=\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/09\/cac-buoc-hoat-dong-cua-static-trong-lop.jpg 650w, https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/09\/cac-buoc-hoat-dong-cua-static-trong-lop-400x246.jpg 400w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><figcaption id=\"caption-attachment-9055\" class=\"wp-caption-text\">C\u00e1c b\u01b0\u1edbc ho\u1ea1t \u0111\u1ed9ng c\u1ee7a Static trong l\u1edbp<\/figcaption><\/figure>\n<p style=\"text-align: justify;\">N\u1ebfu m\u1ed9t bi\u1ebfn v\u1eeba \u0111\u01b0\u1ee3c khai b\u00e1o Static l\u1ea1i v\u1eeba \u0111\u01b0\u1ee3c khai b\u00e1o Final trong Java th\u00ec n\u00f3 \u0111\u01b0\u1ee3c xem nh\u01b0 m\u1ed9t h\u1eb1ng s\u1ed1. Khi gi\u1ea3i tr\u00ecnh m\u1ed9t h\u1eb1ng s\u1ed1, ng\u01b0\u1eddi d\u00f9ng c\u1ea7n vi\u1ebft hoa ch\u1eef c\u00e1i \u0111\u1ea7u v\u00e0 ph\u00e2n c\u00e1ch b\u1eb1ng d\u1ea5u (_) khi c\u00f3 nhi\u1ec1u t\u1eeb.<\/p>\n<p style=\"text-align: justify;\">Gi\u00e1 tr\u1ecb m\u1eb7c \u0111\u1ecbnh d\u00f9ng \u0111\u1ec3 khai b\u00e1o bi\u1ebfn Static v\u00e0 non-Static l\u00e0 t\u01b0\u01a1ng \u0111\u1ed3ng. C\u1ee5 th\u1ec3:<\/p>\n<ul style=\"text-align: justify;\">\n<li style=\"font-weight: 400;\" aria-level=\"1\">Gi\u00e1 tr\u1ecb m\u1eb7c \u0111\u1ecbnh c\u1ee7a primitive integers (long, int, short, byte) l\u00e0 0<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\">Gi\u00e1 tr\u1ecb m\u1eb7c \u0111\u1ecbnh c\u1ee7a primitive floating points (double, float) l\u00e0 0.0<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\">Gi\u00e1 tr\u1ecb m\u1eb7c \u0111\u1ecbnh c\u1ee7a boolean l\u00e0 false<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\">Gi\u00e1 tr\u1ecb m\u1eb7c \u0111\u1ecbnh c\u1ee7a object references l\u00e0 null<\/li>\n<\/ul>\n<p><iframe loading=\"lazy\" title=\"Static Trong Java: Nh\u1eefng g\u00ec thu\u1ed9c v\u1ec1 L\u1edbp | Code Thu\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/6wHU4vl1wGs?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>&gt;&gt;&gt; Xem th\u00eam <a href=\"https:\/\/teky.edu.vn\/blog\/lap-trinh-assembly\/\">: <span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;L\u1eadp tr\u00ecnh Assembly l\u00e0 g\u00ec? C\u00f3 n\u00ean h\u1ecdc Assembly hay kh\u00f4ng?&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:4480,&quot;10&quot;:2,&quot;11&quot;:0,&quot;15&quot;:&quot;Arial&quot;}\">L\u1eadp tr\u00ecnh Assembly l\u00e0 g\u00ec? C\u00f3 n\u00ean h\u1ecdc Assembly hay kh\u00f4ng?<\/span><\/a><\/p>\n<h2 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Vi_du_ve_bien_Static_Class_trong_Java\"><\/span>V\u00ed d\u1ee5 v\u1ec1 bi\u1ebfn Static Class trong Java<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">Ta c\u00f3 300 sinh vi\u00ean tr\u01b0\u1eddng \u0111\u1ea1i h\u1ecdc TMU, college \u0111\u01b0\u1ee3c d\u00f9ng \u0111\u1ec3 ch\u1ec9 thu\u1ed9c t\u00ednh chung c\u1ee7a c\u00e1c \u0111\u1ed1i t\u01b0\u1ee3ng. Khi s\u1eed d\u1ee5ng Static, ta s\u1ebd ch\u1ec9 c\u1ea7n c\u1ea5p ph\u00e1t b\u1ed9 nh\u1edb cho t\u1ea5t c\u1ea3 c\u00e1c \u0111\u1ed1i t\u01b0\u1ee3ng trong 1 l\u1ea7n duy nh\u1ea5t.<\/p>\n<p style=\"text-align: justify;\">\/\/ Ch\u01b0\u01a1ng tr\u00ecnh Java v\u00ed d\u1ee5 v\u1ec1 bi\u1ebfn static<\/p>\n<p style=\"text-align: justify;\">class Student{<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0int id; \/\/instance variable<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0String name;<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0static String college =&#8221;TMU&#8221;; \/\/static variable<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\/\/constructor<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0Student(int i, String n){<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0id = i;<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0name = n;<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0}<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\/\/ Ph\u01b0\u01a1ng th\u1ee9c \u0111\u1ec3 hi\u1ec3n th\u1ecb th\u00f4ng tin sinh vi\u00ean<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0void display(){<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0System.out.println(id+&#8221; &#8220;+name+&#8221; &#8220;+college);<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0}<\/p>\n<p style=\"text-align: justify;\">}<\/p>\n<p style=\"text-align: justify;\">\/\/ T\u1ea1o class kh\u00e1c \u0111\u1ec3 th\u1ef1c hi\u1ec7n hi\u1ec3n th\u1ecb d\u1eef li\u1ec7u<\/p>\n<p style=\"text-align: justify;\">public class TestStaticVariable1{<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0public static void main(String args[]){<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0Student s1 = new Student(17,&#8221;H\u1ea3i&#8221;);<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0Student s2 = new Student(18,&#8221;Doanh&#8221;);<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0\/\/ Ch\u00fang ta c\u00f3 th\u1ec3 thay \u0111\u1ed5i tr\u01b0\u1eddng \u0111\u1ea1i h\u1ecdc c\u1ee7a t\u1ea5t c\u1ea3 sv b\u1eb1ng 1 d\u00f2ng code<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0\/\/Student.college=&#8221;TMU &#8211; ICT H\u00e0 N\u1ed9i&#8221;;<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0s1.display();<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0s2.display();<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0}<\/p>\n<p style=\"text-align: justify;\">}<\/p>\n<p style=\"text-align: justify;\">V\u1edbi n\u1ed9i dung nh\u01b0 tr\u00ea, ta thu \u0111\u01b0\u1ee3c k\u1ebft qu\u1ea3 l\u00e0:<\/p>\n<p style=\"text-align: justify;\">17 H\u1ea3i TMU<\/p>\n<p style=\"text-align: justify;\">18 Doanh TMU<\/p>\n<figure id=\"attachment_9053\" aria-describedby=\"caption-attachment-9053\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-9053\" src=\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/09\/vi-du-ve-static-trong-java.jpg\" alt=\"V\u00ed d\u1ee5 v\u1ec1 Static trong Java\" width=\"650\" height=\"400\" srcset=\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/09\/vi-du-ve-static-trong-java.jpg 650w, https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/09\/vi-du-ve-static-trong-java-400x246.jpg 400w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><figcaption id=\"caption-attachment-9053\" class=\"wp-caption-text\">V\u00ed d\u1ee5 v\u1ec1 Static trong Java<\/figcaption><\/figure>\n<p>&gt;&gt;&gt; Xem th\u00eam<a href=\"https:\/\/teky.edu.vn\/blog\/app-inventor-la-gi\/\"> : <span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;App Inventor l\u00e0 g\u00ec? H\u01b0\u1edbng d\u1eabn s\u1eed d\u1ee5ng App Inventor&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:4480,&quot;10&quot;:2,&quot;11&quot;:0,&quot;15&quot;:&quot;Arial&quot;}\">App Inventor l\u00e0 g\u00ec? H\u01b0\u1edbng d\u1eabn s\u1eed d\u1ee5ng App Inventor<\/span><\/a><\/p>\n<h2 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Luu_y_ve_phuong_thuc_Static_Java\"><\/span>L\u01b0u \u00fd v\u1ec1 ph\u01b0\u01a1ng th\u1ee9c Static Java<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Dac_diem_cua_phuong_thuc_Static_trong_Java\"><\/span>\u0110\u1eb7c \u0111i\u1ec3m c\u1ee7a ph\u01b0\u01a1ng th\u1ee9c Static trong Java<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">Nh\u01b0 \u0111\u00e3 n\u00f3i \u1edf tr\u00ean, m\u1ed9t ph\u01b0\u01a1ng th\u1ee9c \u0111\u01b0\u1ee3c g\u1ecdi l\u00e0 Static khi ta khai b\u00e1o n\u00f3 v\u1edbi bi\u1ebfn Static. Ph\u01b0\u01a1ng th\u1ee9c Static bao g\u1ed3m m\u1ed9t s\u1ed1 \u0111\u1eb7c \u0111i\u1ec3m r\u1ea5t ri\u00eang bi\u1ec7t:<\/p>\n<ul style=\"text-align: justify;\">\n<li style=\"font-weight: 400;\" aria-level=\"1\">Ph\u01b0\u01a1ng th\u1ee9c Static thu\u1ed9c m\u1ed9t l\u1edbp nh\u01b0ng kh\u00f4ng ph\u1ea3i \u0111\u1ed1i t\u01b0\u1ee3ng c\u1ee7a l\u1edbp.<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\">Ng\u01b0\u1eddi d\u00f9ng c\u00f3 th\u1ec3 g\u1ecdi ph\u01b0\u01a1ng th\u1ee9c Static m\u00e0 kh\u00f4ng c\u1ea7n ph\u1ea3i kh\u1edfi t\u1ea1o tr\u01b0\u1edbc m\u1ed9t l\u1edbp.<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\">Bi\u1ebfn Static c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c truy c\u1eadp b\u1edfi ph\u01b0\u01a1ng th\u1ee9c Static \u0111\u1ec3 thay \u0111\u1ed5i gi\u00e1 tr\u1ecb c\u1ee7a n\u00f3.<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\">Ph\u01b0\u01a1ng th\u1ee9c Static kh\u00f4ng th\u1ec3 g\u1ecdi \u0111\u01b0\u1ee3c ph\u01b0\u01a1ng th\u1ee9c non-Static, n\u00f3 ch\u1ec9 c\u00f3 th\u1ec3 g\u1ecdi \u0111\u01b0\u1ee3c ph\u01b0\u01a1ng th\u1ee9c d\u1ea1ng kh\u00e1c. Ngo\u00e0i ra, ph\u01b0\u01a1ng th\u1ee9c Static c\u0169ng kh\u00f4ng th\u1ec3 truy c\u1eadp \u0111\u01b0\u1ee3c data c\u1ee7a ph\u01b0\u01a1ng th\u1ee9c non-Static.<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\">Ta kh\u00f4ng th\u1ec3 d\u00f9ng ph\u01b0\u01a1ng th\u1ee9c Static v\u1edbi 2 t\u1eeb kh\u00f3a this v\u00e0 super.<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\">B\u1ea3n ch\u1ea5t c\u1ee7a qu\u00e1 tr\u00ecnh \u0111\u00e8 d\u1ef1a tr\u00ean ho\u1ea1t \u0111\u1ed9ng g\u00e1n \u0111\u1ed9ng khi ch\u01b0\u01a1ng tr\u00ecnh \u0111ang ch\u1ea1y ho\u1eb7c g\u00e1n t\u0129nh t\u1ea1i th\u1eddi gian bi\u00ean d\u1ecbch. Ch\u00ednh v\u00ec th\u1ebf, ng\u01b0\u1eddi d\u00f9ng kh\u00f4ng th\u1ec3 ghi \u0111\u00e8 ph\u01b0\u01a1ng th\u1ee9c trong Java. Ph\u01b0\u01a1ng th\u1ee9c t\u0129nh kh\u00f4ng c\u00f3 r\u00e0ng bu\u1ed9c v\u1edbi th\u1ef1c th\u1ec3 c\u1ee7a class n\u00ean c\u0169ng kh\u00f4ng th\u1ec3 ghi \u0111\u00e8 n\u00f3.<\/li>\n<\/ul>\n<figure id=\"attachment_9054\" aria-describedby=\"caption-attachment-9054\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-9054\" src=\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/09\/dac-diem-cua-static-trong-java.jpg\" alt=\"\u0110\u1eb7c \u0111i\u1ec3m c\u1ee7a Static trong Java\" width=\"650\" height=\"400\" srcset=\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/09\/dac-diem-cua-static-trong-java.jpg 650w, https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/09\/dac-diem-cua-static-trong-java-400x246.jpg 400w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><figcaption id=\"caption-attachment-9054\" class=\"wp-caption-text\">\u0110\u1eb7c \u0111i\u1ec3m c\u1ee7a Static trong Java<\/figcaption><\/figure>\n<h3 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Truong_hop_nen_su_dung_phuong_thuc_Static\"><\/span>Tr\u01b0\u1eddng h\u1ee3p n\u00ean s\u1eed d\u1ee5ng ph\u01b0\u01a1ng th\u1ee9c Static<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">C\u00f3 nh\u1eefng tr\u01b0\u1eddng h\u1ee3p ri\u00eang \u0111\u1ec3 s\u1eed d\u1ee5ng ph\u01b0\u01a1ng th\u1ee9c Static. Ng\u01b0\u1eddi d\u00f9ng n\u00ean c\u00e2n nh\u1eafc c\u00e1c y\u1ebfu t\u1ed1 sao cho ph\u01b0\u01a1ng th\u1ee9c Static ph\u00e1t huy hi\u1ec7u qu\u1ea3 \u1edf m\u1ee9c cao nh\u1ea5t v\u00e0 tr\u00e1nh \u0111\u01b0\u1ee3c r\u1ee7i ro.<\/p>\n<p style=\"text-align: justify;\">M\u1ed9t trong nh\u1eefng tr\u01b0\u1eddng h\u1ee3p ph\u1ed5 bi\u1ebfn nh\u1ea5t \u0111\u1ec3 s\u1eed d\u1ee5ng t\u1eeb kh\u00f3a Static trong Java cho m\u1ed9t ph\u01b0\u01a1ng th\u1ee9c l\u00e0 khi ph\u01b0\u01a1ng th\u1ee9c \u1ea5y kh\u00f4ng b\u1ecb ph\u1ee5 thu\u1ed9c v\u00e0o tr\u1ea1ng th\u00e1i c\u1ee7a m\u1ed9t \u0111\u1ed1i t\u01b0\u1ee3ng b\u1ea5t k\u1ef3. N\u00f3i d\u1ec5 hi\u1ec3u h\u01a1n t\u1ee9c l\u00e0 ph\u01b0\u01a1ng th\u1ee9c kh\u00f4ng c\u1ea7n d\u00f9ng \u0111\u1ebfn d\u1eef li\u1ec7u th\u00e0nh vi\u00ean. M\u1ecdi th\u1ee9 s\u1ebd \u0111\u01b0\u1ee3c truy\u1ec1n \u0111i d\u01b0\u1edbi d\u1ea1ng tham s\u1ed1.<\/p>\n<p style=\"text-align: justify;\">B\u1ea1n c\u00f3 th\u1ec3 \u1ee9ng d\u1ee5ng Static Method nh\u01b0 m\u1ed9t ph\u01b0\u01a1ng th\u1ee9c ti\u1ec7n \u00edch b\u1edfi n\u00f3 cho ph\u00e9p ng\u01b0\u1eddi d\u00f9ng truy c\u1eadp tr\u1ef1c ti\u1ebfp b\u1eb1ng t\u00ean l\u1edbp m\u00e0 kh\u00f4ng c\u1ea7n b\u1ea5t c\u1ee9 th\u1ec3 hi\u1ec7n n\u00e0o. V\u00ed d\u1ee5 ph\u1ed5 bi\u1ebfn nh\u1ea5t c\u1ee7a tr\u01b0\u1eddng h\u1ee3p n\u00e0y ch\u00ednh l\u00e0 l\u1edbp java.lang.Math.<\/p>\n<p style=\"text-align: justify;\">V\u00e0 cu\u1ed1i c\u00f9ng, ng\u01b0\u1eddi ta c\u0169ng s\u1ebd s\u1eed d\u1ee5ng ph\u01b0\u01a1ng th\u1ee9c Static trong tr\u01b0\u1eddng h\u1ee3p c\u00e1c Design Pattern c\u1ea7n truy c\u1eadp global nh\u01b0 Singleton pattern, Factory pattern\u2026<\/p>\n<p><a href=\"https:\/\/lotrinhlaptrinh.teky.vn\/?utm_id=ContentBlog&amp;utm_medium=Click_Blog&amp;utm_source=ContentBlog\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-22417\" src=\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2023\/10\/dang-ky-lap-trinh-teky1.gif\" alt=\"dang-ky-lap-trinh-teky1\" width=\"600\" height=\"314\" \/><\/a><\/p>\n<p>&gt;&gt;&gt; Xem th\u00eam : <a href=\"https:\/\/teky.edu.vn\/blog\/cach-check-ip\/\"><span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Ip l\u00e0 g\u00ec? C\u00e1ch check ip update 2022 m\u00e0 b\u1ea1n c\u1ea7n ph\u1ea3i bi\u1ebft!&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:4480,&quot;10&quot;:2,&quot;11&quot;:0,&quot;15&quot;:&quot;Arial&quot;}\">Ip l\u00e0 g\u00ec? C\u00e1ch check ip update 2022 m\u00e0 b\u1ea1n c\u1ea7n ph\u1ea3i bi\u1ebft!<\/span><\/a><\/p>\n<h3 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Vi_du_ve_phuong_thuc_Static_trong_Java\"><\/span>V\u00ed d\u1ee5 v\u1ec1 ph\u01b0\u01a1ng th\u1ee9c Static trong Java<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">V\u00ed d\u1ee5: Website gpcoder.com hi\u1ec7n s\u1edf h\u1eefu r\u1ea5t nhi\u1ec1u b\u00e0i vi\u1ebft. M\u1ed7i b\u00e0i vi\u1ebft c\u1ea7n ph\u1ea3i c\u00f3 \u0111\u1ecba ch\u1ec9 c\u1ee7a website \u1edf cu\u1ed1i. T\u1ea5t nhi\u00ean l\u00e0 c\u00e1c \u0111\u1ecba ch\u1ec9 n\u00e0y \u0111\u1ec1u gi\u1ed1ng nhau v\u00e0 c\u00f3 nhi\u1ec1u l\u1edbp c\u1ea7n s\u1eed d\u1ee5ng. \u0110\u1ec3 gi\u1ea3m thi\u1ec3u l\u01b0u tr\u1eef b\u1ed9 nh\u1edb v\u00e0 d\u1ec5 d\u00e0ng chia s\u1ebb khi s\u1eed d\u1ee5ng \u1edf c\u00e1c l\u1edbp kh\u00e1c, ng\u01b0\u1eddi d\u00f9ng n\u00ean \u00e1p d\u1ee5ng t\u1eeb kh\u00f3a Static nh\u01b0 sau:<\/p>\n<p style=\"text-align: justify;\">public class UsingStaticExample {<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0private String subject;<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0UsingStaticExample (String subject) {<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.subject = subject;<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0}<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0public void print() {<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0System.out.println(&#8220;Subject = &#8221; + subject);<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0System.out.println(&#8220;Website = &#8221; + MyWebsite.WEBSITE);<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0}<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0public static void changeWebsite(String website) {<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0MyWebsite.WEBSITE = website;<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0}<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0public static void main(String[] args) {<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0UsingStaticExample ex1 = new UsingStaticExample(&#8220;Core Java&#8221;);<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0ex1.changeWebsite(&#8220;abc.com&#8221;);<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0ex1.print();<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0System.out.println(&#8220;&#8212;-&#8220;);<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0UsingStaticExample.changeWebsite(&#8220;https:\/\/gpcoder.com&#8221;);<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0ex1.print();<\/p>\n<p style=\"text-align: justify;\">\u00a0\u00a0\u00a0\u00a0}<\/p>\n<p style=\"text-align: justify;\">}<\/p>\n<p style=\"text-align: justify;\">T\u1eeb \u0111\u00f3, ta c\u00f3 k\u1ebft qu\u1ea3 thu \u0111\u01b0\u1ee3c l\u00e0:<\/p>\n<p style=\"text-align: justify;\">Subject = Core Java<\/p>\n<p style=\"text-align: justify;\">Website = abc.com<\/p>\n<p style=\"text-align: justify;\">&#8212;-<\/p>\n<p style=\"text-align: justify;\">Subject = Core Java<\/p>\n<p style=\"text-align: justify;\">Website = https:\/\/gpcoder.com<\/p>\n<p><em><strong>M\u1eddi b\u1ea1n \u0111\u1ecdc tham kh\u1ea3o th\u00eam<\/strong>:<span style=\"color: #0000ff;\"> <a class=\"LinkSuggestion__Link-sc-1gewdgc-4 evyocv\" href=\"https:\/\/teky.edu.vn\/blog\/tang-toc-may-tinh-win-10\/\" target=\"_blank\" rel=\"noopener\">Th\u1ee7 thu\u1eadt t\u0103ng t\u1ed1c m\u00e1y t\u00ednh Win 10 kh\u00f4ng ph\u1ea3i ai c\u0169ng bi\u1ebft<\/a><\/span><\/em><\/p>\n<h2 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Ket_luan\"><\/span>K\u1ebft lu\u1eadn<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">V\u1edbi b\u00e0i vi\u1ebft tr\u00ean, Teky \u0111\u00e3 gi\u00fap b\u1ea1n \u0111\u1ecdc hi\u1ec3u th\u00eam m\u1ed9t s\u1ed1 th\u00f4ng tin c\u01a1 b\u1ea3n xung quanh bi\u1ebfn v\u00e0 ph\u01b0\u01a1ng th\u1ee9c Static trong Java. Th\u1ef1c ra d\u00f9ng Static kh\u00f4ng h\u1ec1 kh\u00f3 n\u1ebfu b\u1ea1n n\u1eafm r\u00f5 kh\u00e1i ni\u1ec7m v\u00e0 c\u00e1ch th\u1ee9c ho\u1ea1t \u0111\u1ed9ng c\u1ee7a n\u00f3. Static ho\u1ea1t \u0111\u1ed9ng r\u1ea5t t\u1ed1t trong tr\u01b0\u1eddng h\u1ee3p ng\u01b0\u1eddi d\u00f9ng mu\u1ed1n ti\u1ebft ki\u1ec7m b\u1ed9 nh\u1edb v\u00e0 gi\u1ea3m t\u1ea3i c\u00e1c quy tr\u00ecnh tr\u00f9ng l\u1eb7p v\u1edbi nhau. Tuy nhi\u00ean, h\u00e3y c\u00e2n nh\u1eafc c\u00e1c tr\u01b0\u1eddng h\u1ee3p n\u00ean s\u1eed d\u1ee5ng Static nh\u01b0 ch\u00fang t\u00f4i \u0111\u00e3 g\u1ee3i \u00fd. Vi\u1ec7c qu\u00e1 l\u1ea1m d\u1ee5ng Static ng\u01b0\u1ee3c l\u1ea1i s\u1ebd g\u00e2y t\u1ed1n th\u1eddi gian v\u00e0 r\u1eafc r\u1ed1i h\u01a1n.<\/p>\n<p style=\"text-align: justify;\">C\u1ea3m \u01a1n b\u1ea1n \u0111\u1ecdc \u0111\u00e3 theo d\u00f5i b\u00e0i vi\u1ebft v\u1ec1 Static trong Java trong Java c\u1ee7a ch\u00fang t\u00f4i. \u0110\u1eebng qu\u00ean r\u1eb1ng Teky c\u00f2n r\u1ea5t nhi\u1ec1u b\u00e0i vi\u1ebft gi\u1ea3i m\u00e3 v\u1ec1 l\u1eadp tr\u00ecnh &#8211; IT r\u1ea5t h\u1ea5p d\u1eabn.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Hoc_vien_cong_nghe_Teky_la_noi_hoc_lap_trinh_hang_dau_Viet_Nam\"><\/span><span style=\"font-size: 24px; color: #339966;\" data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;C\u00f9ng T\u00ecm Hi\u1ec3u V\u1ec1 Teky H\u1ecdc Vi\u1ec7n 5 sao \u0110\u00e0o T\u1ea1o Tr\u1ebb Em H\u1ecdc L\u1eadp Tr\u00ecnh (4-18 tu\u1ed5i)&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:17153,&quot;3&quot;:{&quot;1&quot;:0},&quot;11&quot;:4,&quot;12&quot;:0,&quot;17&quot;:1}\">H\u1ecdc vi\u1ec7n c\u00f4ng ngh\u1ec7 Teky l\u00e0 n\u01a1i h\u1ecdc l\u1eadp tr\u00ecnh h\u00e0ng \u0111\u1ea7u Vi\u1ec7t Nam<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><iframe loading=\"lazy\" title=\"H\u1ecdc l\u1eadp tr\u00ecnh tr\u1ebb em \u1edf \u0111\u00e2u? - Gi\u1edbi thi\u1ec7u h\u1ecdc vi\u1ec7n c\u00f4ng ngh\u1ec7 TEKY h\u00e0ng \u0111\u1ea7u Vi\u1ec7t Nam\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/kGgr0XJAxFM?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p><strong>TEKY l\u00e0 H\u1ecdc vi\u1ec7n s\u00e1ng t\u1ea1o c\u00f4ng ngh\u1ec7<\/strong> v\u1edbi ch\u01b0\u01a1ng tr\u00ecnh gi\u1ea3ng d\u1ea1y STEAM (Science \u2013 Technology \u2013 Engineering \u2013 Art \u2013 Mathematics) theo chu\u1ea9n M\u1ef9 \u0111\u1ea7u ti\u00ean t\u1ea1i Vi\u1ec7t Nam d\u00e0nh cho tr\u1ebb em t\u1eeb 4 \u0111\u1ebfn 18 tu\u1ed5i.<\/p>\n<p>\u0110\u01b0\u1ee3c th\u00e0nh l\u1eadp v\u00e0o th\u00e1ng 6 n\u0103m 2016, TEKY quy\u1ebft t\u00e2m th\u1ef1c hi\u1ec7n s\u1ee9 m\u1ec7nh mang \u0111\u1ebfn cho th\u1ebf h\u1ec7 tr\u1ebb Vi\u1ec7t Nam ki\u1ebfn th\u1ee9c to\u00e0n di\u1ec7n v\u1ec1 STEAM, \u0111\u1eb7c bi\u1ec7t l\u00e0 c\u00e1c t\u01b0 duy c\u00f4ng ngh\u1ec7, khoa h\u1ecdc m\u00e1y t\u00ednh v\u00e0 k\u1ef9 n\u0103ng th\u1ebf k\u1ef7 21 \u2013 4Cs (Critical Thinking: T\u01b0 duy ph\u1ea3n bi\u1ec7n \u2013 Communication: Giao ti\u1ebfp \u2013 Creativity: S\u00e1ng t\u1ea1o \u2013 Collaboration: L\u00e0m vi\u1ec7c nh\u00f3m).<\/p>\n<figure id=\"attachment_14828\" aria-describedby=\"caption-attachment-14828\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/teky.edu.vn\/?utm_source=Blog&amp;utm_medium=baiviet\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-14828 size-full\" src=\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/03\/Trai-nghiem-hoc-lap-trinh-mien-phi.jpg\" alt=\"Tr\u1ea3i nghi\u1ec7m h\u1ecdc l\u1eadp tr\u00ecnh mi\u1ec5n ph\u00ed\" width=\"600\" height=\"400\" srcset=\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/03\/Trai-nghiem-hoc-lap-trinh-mien-phi.jpg 600w, https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/03\/Trai-nghiem-hoc-lap-trinh-mien-phi-400x267.jpg 400w, https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/03\/Trai-nghiem-hoc-lap-trinh-mien-phi-272x182.jpg 272w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><figcaption id=\"caption-attachment-14828\" class=\"wp-caption-text\">Tr\u1ea3i nghi\u1ec7m h\u1ecdc l\u1eadp tr\u00ecnh mi\u1ec5n ph\u00ed<\/figcaption><\/figure>\n<h4><span class=\"ez-toc-section\" id=\"Day_la_chuong_trinh_khong_chi_trang_bi_kien_thuc_lap_trinh_ma_con_ren_luyen_nhom_ky_nang_4Cs_Tre_se_duoc\"><\/span>\u0110\u00e2y l\u00e0 ch\u01b0\u01a1ng tr\u00ecnh kh\u00f4ng ch\u1ec9 trang b\u1ecb ki\u1ebfn th\u1ee9c l\u1eadp tr\u00ecnh m\u00e0 c\u00f2n r\u00e8n luy\u1ec7n nh\u00f3m k\u1ef9 n\u0103ng 4Cs. Tr\u1ebb s\u1ebd \u0111\u01b0\u1ee3c:<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li>\u00a0H\u1ecdc t\u01b0 duy ph\u1ea3n bi\u1ec7n th\u00f4ng qua vi\u1ec7c ph\u00e2n t\u00edch c\u00e1c v\u1ea5n \u0111\u1ec1.<\/li>\n<li>\u00a0H\u1ecdc t\u00ednh s\u00e1ng t\u1ea1o t\u01b0 duy Logic th\u00f4ng qua vi\u1ec7c l\u1eafp \u0111\u1eb7t v\u00e0 l\u1eadp tr\u00ecnh robot th \u00f4ng qua c\u00e1c m\u00f4 h\u00ecnh Lego Mindstorm, app tr\u00f2 ch\u01a1i. Gi\u00fap con h\u1ecdc gi\u1ecfi m\u00f4n To\u00e1n tr\u00ean l\u1edbp<\/li>\n<li>\u00a0K\u1ef9 n\u0103ng h\u1ee3p t\u00e1c th\u00f4ng qua c\u00e1c tr\u00f2 ch\u01a1i team-building, c\u00e1c d\u1ef1 \u00e1n nh\u00f3m tr\u00ean l\u1edbp.<\/li>\n<li>\u00a0Ph\u00e1t huy kh\u1ea3 n\u0103ng giao ti\u1ebfp hi\u1ec7u qu\u1ea3 b\u1eb1ng nhi\u1ec1u b\u00e0i t\u1eadp v\u00e0 ho\u1ea1t \u0111\u1ed9ng h\u1ea5p d\u1eabn.<\/li>\n<\/ul>\n<p><iframe loading=\"lazy\" title=\"Shark Nguy\u1ec5n Ho\u00e0 B\u00ecnh \u0111\u1ed3ng h\u00e0nh c\u00f9ng con h\u1ecdc l\u1eadp tr\u00ecnh t\u1ea1i h\u1ecdc vi\u1ec7n c\u00f4ng ngh\u1ec7 Teky h\u00e0ng \u0111\u1ea7u Vi\u1ec7t Nam\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/q6QbqIs6ll8?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>C\u00e1c b\u1ed9 m\u00f4n gi\u1ea3ng d\u1ea1y t\u1ea1i Teky g\u1ed3m: <span style=\"font-weight: 400;\">L\u1eadp tr\u00ecnh v\u00e0 ph\u00e1t tri\u1ec3n \u1ee9ng d\u1ee5ng<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">l\u1eadp tr\u00ecnh game<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">l\u1eadp tr\u00ecnh web v\u1edbi python<\/span> <span style=\"font-weight: 400;\">\u00a0<\/span><span style=\"font-weight: 400;\">L\u1eadp tr\u00ecnh Scratch<\/span> <span style=\"font-weight: 400;\">Robotics<\/span> Engineering, C\u00f4ng ngh\u1ec7 3D v\u00e0 MultiMedia. Ch\u00fang t\u00f4i tin r\u1eb1ng tr\u1ebb em Vi\u1ec7t Nam c\u00f3 c\u01a1 h\u1ed9i ph\u00e1t tri\u1ec3n m\u1ea1nh m\u1ebd trong m\u1ed9t n\u1ec1n kinh t\u1ebf s\u1ed1 v\u00e0 c\u1ea7n \u0111\u01b0\u1ee3c trang b\u1ecb s\u1eb5n s\u00e0ng \u0111\u1ec3 tr\u1edf th\u00e0nh nh\u1eefng doanh nh\u00e2n c\u00f4ng ngh\u1ec7 trong t\u01b0\u01a1ng lai.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Lien_he_ngay_hoc_vien_cong_nghe_sang_tao_TEKY_de_duoc_tu_van_khoa_hoc\"><\/span><span style=\"color: #008000;\"><b>Li\u00ean h\u1ec7 ngay h\u1ecdc vi\u1ec7n c\u00f4ng ngh\u1ec7 s\u00e1ng t\u1ea1o TEKY \u0111\u1ec3 \u0111\u01b0\u1ee3c t\u01b0 v\u1ea5n kh\u00f3a h\u1ecdc:<\/b><\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Cam k\u00eat 7 tu\u1ed5i c\u00f3 th\u1ec3 l\u1eadp tr\u00ecnh<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Top 10 d\u1ef1 \u00e1n gi\u00e1o d\u1ee5c c\u00f3 t\u1ea7m \u1ea3nh h\u01b0\u1edfng nh\u1ea5t \u0110\u00f4ng Nam \u00c1 2017 &amp; 2018<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Top 3 D\u1ef1 \u00e1n xu\u1ea5t s\u1eafc nh\u1ea5t, NextGen \u2013 Th\u1ee5y S\u0129<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u00a0Hotline H\u00e0 N\u1ed9i: 024-7109-6668 | 0975-241-015<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u00a0Hotline H\u1ed3 Ch\u00ed Minh: 028-7109 9948 | 097-900-8642<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Website <\/span><a href=\"https:\/\/teky.edu.vn\/\"><span style=\"font-weight: 400;\">https:\/\/teky.edu.vn<\/span><\/a><span style=\"font-weight: 400;\"> | Email: support@teky.edu.vn |<\/span><\/p>\n<p style=\"text-align: justify;\">\n","protected":false},"excerpt":{"rendered":"<p>Static l\u00e0 m\u1ed9t trong nh\u1eefng t\u1eeb kh\u00f3a quan tr\u1ecdng c\u1ee7a Java. \u0110\u1ec3 l\u1eadp tr\u00ecnh t\u1ed1t, b\u1ea1n c\u1ea7n n\u1eafm ch\u1eafc kh\u00e1i ni\u1ec7m c\u1ee7a t\u1eeb kh\u00f3a Static c\u0169ng nh\u01b0 c\u00e1c d\u1ea1ng th\u1ec3 hi\u1ec7n v\u00e0 c\u00e1ch s\u1eed d\u1ee5ng c\u1ee7a n\u00f3. Static kh\u00f4ng g\u00e2y kh\u00f3 kh\u0103n cho ng\u01b0\u1eddi d\u00f9ng nh\u01b0ng l\u1ea1i \u0111\u00f2i h\u1ecfi b\u1ea1n ph\u1ea3i th\u1ea5u hi\u1ec3u ho\u00e0n to\u00e0n &hellip;<\/p>\n","protected":false},"author":10,"featured_media":9052,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28],"tags":[],"class_list":["post-9051","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-lap-trinh"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.9 (Yoast SEO v26.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Static trong Java l\u00e0 g\u00ec? Nh\u1eefng th\u00f4ng tin c\u01a1 b\u1ea3n nh\u1ea5t v\u1ec1 Static 2021<\/title>\n<meta name=\"description\" content=\"Static trong Java l\u00e0 m\u1ed9t kh\u00e1i ni\u1ec7m kh\u00f4ng c\u00f2n xa l\u1ea1 v\u1edbi nh\u1eefng ng\u01b0\u1eddi h\u1ecdc l\u1eadp tr\u00ecnh. Tuy nhi\u00ean \u0111\u1ec3 v\u1eadn d\u1ee5ng t\u1ed1t th\u00ec kh\u00f4ng h\u1ec1 \u0111\u01a1n gi\u1ea3n.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/teky.edu.vn\/blog\/static-trong-java\/\" \/>\n<meta property=\"og:locale\" content=\"vi_VN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Static trong Java l\u00e0 g\u00ec? Nh\u1eefng th\u00f4ng tin c\u01a1 b\u1ea3n nh\u1ea5t v\u1ec1 Static 2021\" \/>\n<meta property=\"og:description\" content=\"Static trong Java l\u00e0 m\u1ed9t kh\u00e1i ni\u1ec7m kh\u00f4ng c\u00f2n xa l\u1ea1 v\u1edbi nh\u1eefng ng\u01b0\u1eddi h\u1ecdc l\u1eadp tr\u00ecnh. Tuy nhi\u00ean \u0111\u1ec3 v\u1eadn d\u1ee5ng t\u1ed1t th\u00ec kh\u00f4ng h\u1ec1 \u0111\u01a1n gi\u1ea3n.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/teky.edu.vn\/blog\/static-trong-java\/\" \/>\n<meta property=\"og:site_name\" content=\"TEKY - H\u1ecdc vi\u1ec7n s\u00e1ng t\u1ea1o c\u00f4ng ngh\u1ec7\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TekyAcademy\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-23T09:40:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-30T01:36:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/09\/static-trong-java.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"650\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Kh\u00e1nh Kim\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@SteamTeky\" \/>\n<meta name=\"twitter:site\" content=\"@SteamTeky\" \/>\n<meta name=\"twitter:label1\" content=\"\u0110\u01b0\u1ee3c vi\u1ebft b\u1edfi\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kh\u00e1nh Kim\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 ph\u00fat\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/teky.edu.vn\/blog\/static-trong-java\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/teky.edu.vn\/blog\/static-trong-java\/\"},\"author\":{\"name\":\"Kh\u00e1nh Kim\",\"@id\":\"https:\/\/teky.edu.vn\/blog\/#\/schema\/person\/8f946d2123e4e2277107e392790a1bd6\"},\"headline\":\"Static trong Java l\u00e0 g\u00ec? Nh\u1eefng th\u00f4ng tin c\u01a1 b\u1ea3n nh\u1ea5t v\u1ec1 Static 2021\",\"datePublished\":\"2023-10-23T09:40:22+00:00\",\"dateModified\":\"2023-10-30T01:36:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/teky.edu.vn\/blog\/static-trong-java\/\"},\"wordCount\":2902,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/teky.edu.vn\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/teky.edu.vn\/blog\/static-trong-java\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/09\/static-trong-java.jpg\",\"articleSection\":[\"IT - L\u1eadp tr\u00ecnh\"],\"inLanguage\":\"vi\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/teky.edu.vn\/blog\/static-trong-java\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/teky.edu.vn\/blog\/static-trong-java\/\",\"url\":\"https:\/\/teky.edu.vn\/blog\/static-trong-java\/\",\"name\":\"Static trong Java l\u00e0 g\u00ec? Nh\u1eefng th\u00f4ng tin c\u01a1 b\u1ea3n nh\u1ea5t v\u1ec1 Static 2021\",\"isPartOf\":{\"@id\":\"https:\/\/teky.edu.vn\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/teky.edu.vn\/blog\/static-trong-java\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/teky.edu.vn\/blog\/static-trong-java\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/09\/static-trong-java.jpg\",\"datePublished\":\"2023-10-23T09:40:22+00:00\",\"dateModified\":\"2023-10-30T01:36:12+00:00\",\"description\":\"Static trong Java l\u00e0 m\u1ed9t kh\u00e1i ni\u1ec7m kh\u00f4ng c\u00f2n xa l\u1ea1 v\u1edbi nh\u1eefng ng\u01b0\u1eddi h\u1ecdc l\u1eadp tr\u00ecnh. Tuy nhi\u00ean \u0111\u1ec3 v\u1eadn d\u1ee5ng t\u1ed1t th\u00ec kh\u00f4ng h\u1ec1 \u0111\u01a1n gi\u1ea3n.\",\"breadcrumb\":{\"@id\":\"https:\/\/teky.edu.vn\/blog\/static-trong-java\/#breadcrumb\"},\"inLanguage\":\"vi\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/teky.edu.vn\/blog\/static-trong-java\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"vi\",\"@id\":\"https:\/\/teky.edu.vn\/blog\/static-trong-java\/#primaryimage\",\"url\":\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/09\/static-trong-java.jpg\",\"contentUrl\":\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/09\/static-trong-java.jpg\",\"width\":650,\"height\":400,\"caption\":\"Static trong Java\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/teky.edu.vn\/blog\/static-trong-java\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"IT - L\u1eadp tr\u00ecnh\",\"item\":\"https:\/\/teky.edu.vn\/blog\/lap-trinh\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Static trong Java l\u00e0 g\u00ec? Nh\u1eefng th\u00f4ng tin c\u01a1 b\u1ea3n nh\u1ea5t v\u1ec1 Static 2021\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/teky.edu.vn\/blog\/#website\",\"url\":\"https:\/\/teky.edu.vn\/blog\/\",\"name\":\"TEKY - H\u1ecdc vi\u1ec7n s\u00e1ng t\u1ea1o c\u00f4ng ngh\u1ec7\",\"description\":\"Tr\u1ebb em c\u1ea7n h\u1ecdc l\u1eadp tr\u00ecnh\",\"publisher\":{\"@id\":\"https:\/\/teky.edu.vn\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/teky.edu.vn\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"vi\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/teky.edu.vn\/blog\/#organization\",\"name\":\"TEKY - H\u1ecdc vi\u1ec7n s\u00e1ng t\u1ea1o c\u00f4ng ngh\u1ec7\",\"url\":\"https:\/\/teky.edu.vn\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"vi\",\"@id\":\"https:\/\/teky.edu.vn\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/02\/logo-teky.png\",\"contentUrl\":\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/02\/logo-teky.png\",\"width\":495,\"height\":234,\"caption\":\"TEKY - H\u1ecdc vi\u1ec7n s\u00e1ng t\u1ea1o c\u00f4ng ngh\u1ec7\"},\"image\":{\"@id\":\"https:\/\/teky.edu.vn\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/TekyAcademy\",\"https:\/\/x.com\/SteamTeky\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/teky.edu.vn\/blog\/#\/schema\/person\/8f946d2123e4e2277107e392790a1bd6\",\"name\":\"Kh\u00e1nh Kim\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"vi\",\"@id\":\"https:\/\/teky.edu.vn\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ab08c4bbf1d0787f26b32ab04d2cb7e329a3a082ea3dcb6ba78fb27076b856a9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ab08c4bbf1d0787f26b32ab04d2cb7e329a3a082ea3dcb6ba78fb27076b856a9?s=96&d=mm&r=g\",\"caption\":\"Kh\u00e1nh Kim\"},\"url\":\"https:\/\/teky.edu.vn\/blog\/author\/kimkhanh\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Static trong Java l\u00e0 g\u00ec? Nh\u1eefng th\u00f4ng tin c\u01a1 b\u1ea3n nh\u1ea5t v\u1ec1 Static 2021","description":"Static trong Java l\u00e0 m\u1ed9t kh\u00e1i ni\u1ec7m kh\u00f4ng c\u00f2n xa l\u1ea1 v\u1edbi nh\u1eefng ng\u01b0\u1eddi h\u1ecdc l\u1eadp tr\u00ecnh. Tuy nhi\u00ean \u0111\u1ec3 v\u1eadn d\u1ee5ng t\u1ed1t th\u00ec kh\u00f4ng h\u1ec1 \u0111\u01a1n gi\u1ea3n.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/teky.edu.vn\/blog\/static-trong-java\/","og_locale":"vi_VN","og_type":"article","og_title":"Static trong Java l\u00e0 g\u00ec? Nh\u1eefng th\u00f4ng tin c\u01a1 b\u1ea3n nh\u1ea5t v\u1ec1 Static 2021","og_description":"Static trong Java l\u00e0 m\u1ed9t kh\u00e1i ni\u1ec7m kh\u00f4ng c\u00f2n xa l\u1ea1 v\u1edbi nh\u1eefng ng\u01b0\u1eddi h\u1ecdc l\u1eadp tr\u00ecnh. Tuy nhi\u00ean \u0111\u1ec3 v\u1eadn d\u1ee5ng t\u1ed1t th\u00ec kh\u00f4ng h\u1ec1 \u0111\u01a1n gi\u1ea3n.","og_url":"https:\/\/teky.edu.vn\/blog\/static-trong-java\/","og_site_name":"TEKY - H\u1ecdc vi\u1ec7n s\u00e1ng t\u1ea1o c\u00f4ng ngh\u1ec7","article_publisher":"https:\/\/www.facebook.com\/TekyAcademy","article_published_time":"2023-10-23T09:40:22+00:00","article_modified_time":"2023-10-30T01:36:12+00:00","og_image":[{"width":650,"height":400,"url":"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/09\/static-trong-java.jpg","type":"image\/jpeg"}],"author":"Kh\u00e1nh Kim","twitter_card":"summary_large_image","twitter_creator":"@SteamTeky","twitter_site":"@SteamTeky","twitter_misc":{"\u0110\u01b0\u1ee3c vi\u1ebft b\u1edfi":"Kh\u00e1nh Kim","\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc":"13 ph\u00fat"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/teky.edu.vn\/blog\/static-trong-java\/#article","isPartOf":{"@id":"https:\/\/teky.edu.vn\/blog\/static-trong-java\/"},"author":{"name":"Kh\u00e1nh Kim","@id":"https:\/\/teky.edu.vn\/blog\/#\/schema\/person\/8f946d2123e4e2277107e392790a1bd6"},"headline":"Static trong Java l\u00e0 g\u00ec? Nh\u1eefng th\u00f4ng tin c\u01a1 b\u1ea3n nh\u1ea5t v\u1ec1 Static 2021","datePublished":"2023-10-23T09:40:22+00:00","dateModified":"2023-10-30T01:36:12+00:00","mainEntityOfPage":{"@id":"https:\/\/teky.edu.vn\/blog\/static-trong-java\/"},"wordCount":2902,"commentCount":0,"publisher":{"@id":"https:\/\/teky.edu.vn\/blog\/#organization"},"image":{"@id":"https:\/\/teky.edu.vn\/blog\/static-trong-java\/#primaryimage"},"thumbnailUrl":"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/09\/static-trong-java.jpg","articleSection":["IT - L\u1eadp tr\u00ecnh"],"inLanguage":"vi","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/teky.edu.vn\/blog\/static-trong-java\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/teky.edu.vn\/blog\/static-trong-java\/","url":"https:\/\/teky.edu.vn\/blog\/static-trong-java\/","name":"Static trong Java l\u00e0 g\u00ec? Nh\u1eefng th\u00f4ng tin c\u01a1 b\u1ea3n nh\u1ea5t v\u1ec1 Static 2021","isPartOf":{"@id":"https:\/\/teky.edu.vn\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/teky.edu.vn\/blog\/static-trong-java\/#primaryimage"},"image":{"@id":"https:\/\/teky.edu.vn\/blog\/static-trong-java\/#primaryimage"},"thumbnailUrl":"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/09\/static-trong-java.jpg","datePublished":"2023-10-23T09:40:22+00:00","dateModified":"2023-10-30T01:36:12+00:00","description":"Static trong Java l\u00e0 m\u1ed9t kh\u00e1i ni\u1ec7m kh\u00f4ng c\u00f2n xa l\u1ea1 v\u1edbi nh\u1eefng ng\u01b0\u1eddi h\u1ecdc l\u1eadp tr\u00ecnh. Tuy nhi\u00ean \u0111\u1ec3 v\u1eadn d\u1ee5ng t\u1ed1t th\u00ec kh\u00f4ng h\u1ec1 \u0111\u01a1n gi\u1ea3n.","breadcrumb":{"@id":"https:\/\/teky.edu.vn\/blog\/static-trong-java\/#breadcrumb"},"inLanguage":"vi","potentialAction":[{"@type":"ReadAction","target":["https:\/\/teky.edu.vn\/blog\/static-trong-java\/"]}]},{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/teky.edu.vn\/blog\/static-trong-java\/#primaryimage","url":"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/09\/static-trong-java.jpg","contentUrl":"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/09\/static-trong-java.jpg","width":650,"height":400,"caption":"Static trong Java"},{"@type":"BreadcrumbList","@id":"https:\/\/teky.edu.vn\/blog\/static-trong-java\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"IT - L\u1eadp tr\u00ecnh","item":"https:\/\/teky.edu.vn\/blog\/lap-trinh\/"},{"@type":"ListItem","position":2,"name":"Static trong Java l\u00e0 g\u00ec? Nh\u1eefng th\u00f4ng tin c\u01a1 b\u1ea3n nh\u1ea5t v\u1ec1 Static 2021"}]},{"@type":"WebSite","@id":"https:\/\/teky.edu.vn\/blog\/#website","url":"https:\/\/teky.edu.vn\/blog\/","name":"TEKY - H\u1ecdc vi\u1ec7n s\u00e1ng t\u1ea1o c\u00f4ng ngh\u1ec7","description":"Tr\u1ebb em c\u1ea7n h\u1ecdc l\u1eadp tr\u00ecnh","publisher":{"@id":"https:\/\/teky.edu.vn\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/teky.edu.vn\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"vi"},{"@type":"Organization","@id":"https:\/\/teky.edu.vn\/blog\/#organization","name":"TEKY - H\u1ecdc vi\u1ec7n s\u00e1ng t\u1ea1o c\u00f4ng ngh\u1ec7","url":"https:\/\/teky.edu.vn\/blog\/","logo":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/teky.edu.vn\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/02\/logo-teky.png","contentUrl":"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/02\/logo-teky.png","width":495,"height":234,"caption":"TEKY - H\u1ecdc vi\u1ec7n s\u00e1ng t\u1ea1o c\u00f4ng ngh\u1ec7"},"image":{"@id":"https:\/\/teky.edu.vn\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TekyAcademy","https:\/\/x.com\/SteamTeky"]},{"@type":"Person","@id":"https:\/\/teky.edu.vn\/blog\/#\/schema\/person\/8f946d2123e4e2277107e392790a1bd6","name":"Kh\u00e1nh Kim","image":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/teky.edu.vn\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ab08c4bbf1d0787f26b32ab04d2cb7e329a3a082ea3dcb6ba78fb27076b856a9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ab08c4bbf1d0787f26b32ab04d2cb7e329a3a082ea3dcb6ba78fb27076b856a9?s=96&d=mm&r=g","caption":"Kh\u00e1nh Kim"},"url":"https:\/\/teky.edu.vn\/blog\/author\/kimkhanh\/"}]}},"_links":{"self":[{"href":"https:\/\/teky.edu.vn\/blog\/wp-json\/wp\/v2\/posts\/9051","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/teky.edu.vn\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/teky.edu.vn\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/teky.edu.vn\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/teky.edu.vn\/blog\/wp-json\/wp\/v2\/comments?post=9051"}],"version-history":[{"count":3,"href":"https:\/\/teky.edu.vn\/blog\/wp-json\/wp\/v2\/posts\/9051\/revisions"}],"predecessor-version":[{"id":23089,"href":"https:\/\/teky.edu.vn\/blog\/wp-json\/wp\/v2\/posts\/9051\/revisions\/23089"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/teky.edu.vn\/blog\/wp-json\/wp\/v2\/media\/9052"}],"wp:attachment":[{"href":"https:\/\/teky.edu.vn\/blog\/wp-json\/wp\/v2\/media?parent=9051"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/teky.edu.vn\/blog\/wp-json\/wp\/v2\/categories?post=9051"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/teky.edu.vn\/blog\/wp-json\/wp\/v2\/tags?post=9051"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}