Articles on Trending Technologies

Technical articles with clear explanations and examples

Tutorix - AI Tutor

CopyOnWriteArrayList Class in Java

karthikeya Boyini
karthikeya Boyini
Updated on 11-Mar-2026 5K+ Views

Class declarationpublic class CopyOnWriteArrayList    extends Object implements List, RandomAccess, Cloneable, SerializableCopyOnWriteArrayList is a thread-safe variant of ArrayList where operations which can change the ArrayList (add, update, set methods) creates a clone of the underlying array.CopyOnWriteArrayList is to be used in a Thread based environment where read operations are very frequent and update operations are rare.Iterator of CopyOnWriteArrayList will never throw ConcurrentModificationException.Any type of modification to CopyOnWriteArrayList will not reflect during iteration since the iterator was created.List modification methods like remove, set and add are not supported in the iteration. This method will throw UnsupportedOperationException.null can be added to the ...

Read More

Bootstrap .btn-lg class

karthikeya Boyini
karthikeya Boyini
Updated on 11-Mar-2026 336 Views

To make a large button, use the .btn-lg class in Bootstrap.You can try to run the following code to implement the btn-lg classExample           Bootstrap Example                                                Large button          

Read More

Add the default styles for the dropdown menu container in Bootstrap

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 11-Mar-2026 297 Views

Use the .dropdown-menu class in Bootstrap to add the default styles for the dropdown menu containerExample           Bootstrap Example                                          Mobile Phones          The following are the mobile phone brands available in India:                       Companies                                            Apple                Samsung                Oppo                Nokia                                

Read More

Bootstrap .btn-link class

Ankith Reddy
Ankith Reddy
Updated on 11-Mar-2026 418 Views

Deemphasize a button by making it look like a link while maintaining button behavior using the btn-link class in Bootstrap −Example           Bootstrap Example                                       Link Button    

Read More

Callback using Interfaces in Java

Samual Sam
Samual Sam
Updated on 11-Mar-2026 4K+ Views

In the case of Event-driven programming, we pass a reference to a function which will get called when an event occurs. This mechanism is termed as a callback. Java does not support function pointers. So we can not implement the same direction. But using interfaces we can achieve the same very easily.In the example below, we've made a callback when a button is clicked. See the steps −Create an interface ClickEventHandler with a single method handleClick().Create a ClickHandler class which implements this interface ClickEventHandler.Create a Button class which will call ClickHandler when it's click method is called.Test the application.Example//Step 1: ...

Read More

Calling a method using null in Java

karthikeya Boyini
karthikeya Boyini
Updated on 11-Mar-2026 818 Views

When a method is invoked on a null reference, it throws NullPointerException but in case of the static method, we can make it possible using cast expression. See the example below −Examplepublic class Tester {    public static void display(){       System.out.println("display");    }    private void print() {       System.out.println("print");    }    public static void main(String[] args) {       //Scenario 1:       //Calling a method on null reference       //causes NullPointerException       try {          Tester test = null;       ...

Read More

Bootstrap progress class

karthikeya Boyini
karthikeya Boyini
Updated on 11-Mar-2026 268 Views

Use the .progress class in Bootstrap to create a progress bar. The class is a container for progress bars.You can try to run the following code to implement progress class in BootstrapExample           Bootstrap Example                                                       90% Complete                    

Read More

Bootstrap .btn-block class

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 563 Views

To create a button using the .btn-block class, you can try to run the following code −Example           Bootstrap Example                                       The following are block level buttons:                Block level Primary button                      Block level button          

Read More

Add a fading effect when closing an alert box in Bootstrap

Rishi Rathor
Rishi Rathor
Updated on 11-Mar-2026 415 Views

Use the .fade class in Bootstrap to add a fading effect when the alert is closed:Example           Bootstrap Example                                          Eclipse Refactoring                       ×             To refactor code in Eclipse, try the below given steps in the video (You can also close this alert)                                                                

Read More

Add plain text next to a form label within a form with Bootstrap

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 11-Mar-2026 639 Views

To add plain text to a form label within a form, use the .form-control-static in Bootstrap.You can try to run the following code to implement a .form-control-static class in BootstrapExample           Bootstrap Example                                                       Email:                            amit@demo.com                                

Read More
Showing 30141–30150 of 61,298 articles
Advertisements