In OOP,

Static in JAVA

           Static static variable It is a variable which belongs to the class and not to object(instance) Static variables are initialized only once , at the start of the execution . These variables will be initialized first, before the initialization of any instance variables A single copy to be shared by all instances of the class A static variable can be accessed directly by the class name and doesn’t need any object...

Continue Reading

In OOP,

Java Basic Day 1

What is  Java?  - là một ngôn ngữ lập trình     OOP: - Chẳng qua là một mô hình lập trình      Ưu điểm: Làm tăng hiệu suất lập trình + Thường dự án lớn mới sử dụng Java thì mới cảm nhận được ưu điểm của Java + Dự án nhỏ thì thường dùng ngôn ngữ khác Lập trình OOP: Viết...

Continue Reading

In jQuery,

Set select option 'selected', by value

I have a select field with some options in it. Now I need to select one of those options with jQuery. But how can I do that when I only know the value of the option that must be selected? I have the following HTML: <div class="id_100"> <select> <option value="val1">Val 1</option> <option value="val2">Val 2</option> <option value="val3">Val 3</option> </select> </div> I need to select...

Continue Reading

In jQuery,

How to check a radio button with jQuery ?

I try to check a radio button with jQuery. Here's my code: <form> <div id='type'> <input type='radio' id='radio_1' name='type' value='1' /> <input type='radio' id='radio_2' name='type' value='2' /> <input type='radio' id='radio_3' name='type' value='3' /> </div> </form> And the JavasScript: jQuery("#radio_1").attr('checked', true); Doesn't work: jQuery("input[value='1']").attr('checked', true); Doesn't work: jQuery('input:radio[name="type"]').filter('[value="1"]').attr('checked', true); Doesn't work: Do you have another idea? What am I missing? ==================================== anwser: One more...

Continue Reading

In Lập Trình JAVA,

Bộ nhớ Heap và Stack trong Java

Bài viết giải thích sự khác nhau của Heap và Stack trong Java, cũng như sự liên quan giữa chúng trong quá trình chạy chương trình. Thuật ngữ sử dụng: - Runtime: thời gian chạy chương trình - Java Heap Memory: Bộ nhớ Heap trong Java - Java Stack Memory: Bộ nhớ Stack trong Java - JVM: Java Virtual Machine, máy ảo Java dùng để chạy chương...

Continue Reading

Popular Posts

Like us on Facebook

Flickr Images

Subscribe