George John

George John

789 Articles Published

Articles by George John

Page 34 of 79

Get the fully-qualified name of a class in Java

George John
George John
Updated on 11-Mar-2026 12K+ Views

A fully-qualified class name in Java contains the package that the class originated from. An example of this is java.util.ArrayList. The fully-qualified class name can be obtained using the getName() method.A program that demonstrates this is given as follows −Examplepublic class Demo {    public static void main(String[] argv) throws Exception {       Class c = java.util.ArrayList.class;       String className = c.getName();       System.out.println("The fully-qualified name of the class is: " + className);    } }OutputThe fully-qualified name of the class is: java.util.ArrayListNow let us understand the above program.The getName() method is used to ...

Read More

Sort subset of array elements in Java

George John
George John
Updated on 11-Mar-2026 5K+ Views

The java.util.Arrays.sort() method can be used to sort a subset of the array elements in Java. This method has three arguments i.e. the array to be sorted, the index of the first element of the subset (included in the sorted elements) and the index of the last element of the subset (excluded from the sorted elements). Also, the Arrays.sort() method does not return any value.A program that demonstrates this is given as follows −Exampleimport java.util.Arrays; public class Demo {    public static void main(String[] args) {       int arr[] = { 1, 9, 7, 3, 2, 8, 4, ...

Read More

C++ Program to Swap Numbers in Cyclic Order Using Call by Reference

George John
George John
Updated on 11-Mar-2026 1K+ Views

Three numbers can be swapped in cyclic order by passing them to a function cyclicSwapping() using call by reference. This function swaps the numbers in a cyclic fashion.The program to swap numbers in cyclic order using call by reference is given as follows −Example#include using namespace std; void cyclicSwapping(int *x, int *y, int *z) {    int temp;    temp = *y;    *y = *x;    *x = *z;    *z = temp; } int main() {    int x, y, z;    cout > y >> z;    cout

Read More

getchar_unlocked() in C

George John
George John
Updated on 11-Mar-2026 482 Views

The function getchar_unlocked() is deprecated in Windows because it is a thread unsafe version of getchar(). It is suggested not to use getchar_unlocked(). There is no stream lock check that’s why getchar_unlocked is unsafe. The function getchar_unlocked() is faster than getchar().Here is the syntax of getchar_unlocked() in C language,int getchar_unlocked(void);A program of getchar_unlocked() in C is as follows −Example#include int main() {    char val;    val = getchar_unlocked();    printf("Enter the character : ");    printf("Entered character : %c", val);    return 0; }OutputHere is the outputEnter the character : a Entered character : a

Read More

sr-only Bootstrap class

George John
George John
Updated on 11-Mar-2026 469 Views

Hide an element to all devices except screen readers with the class .sr-only.You can try to run the following code to implement the sr-only Bootstrap −Example           Bootstrap Example                                                                      Email address                                                        Password                                                

Read More

Set disabled state for Bootstrap Buttons

George John
George John
Updated on 11-Mar-2026 325 Views

To set disabled state, use the disabled class.You can try to run the following code for the disabled state of a button −Example           Bootstrap Example                                 The following are some buttons:                Default Button                      Disabled Button          

Read More

Bootstrap progress-bar class

George John
George John
Updated on 11-Mar-2026 302 Views

Use the progress-bar class in Bootstrap to create a progress bar.You can try to run the following code to implement progress-bar class in Bootstrap −Example           Bootstrap Example                                                       70% Complete                    

Read More

Usage of btn-xs Bootstrap class

George John
George John
Updated on 11-Mar-2026 246 Views

Create an extra small button using the btn-xs Bootstrap class. You can try to run the following code to implement the btn-xs class:Example           Bootstrap Example                                                       Subject                                             Programming             Web Dev             Database             Networking                    

Read More

Change the size of Bootstrap input groups

George John
George John
Updated on 11-Mar-2026 2K+ Views

Change the size of the input groups, by adding the relative form sizing classes like .input-group-lg, input-group-sm, input-group-xs to the .input-group itself.You can try to run the following code to change the size of input groups in Bootstrap:Example           Bootstrap Example                                                                   @                                                       @                                                       @                                

Read More

Set large modal in Bootstrap

George John
George John
Updated on 11-Mar-2026 3K+ Views

Use the .modal-lg class in Bootstrap to set large modal with more width.You can try to run the following code to set large modal;Example           Bootstrap Example                                          Examination          Result                                                                                    ×                      Warning                                                          If JavaScript isn't enabled in your web browser, then you may not be able to see the result.                                                          Close                                                                  

Read More
Showing 331–340 of 789 articles
« Prev 1 32 33 34 35 36 79 Next »
Advertisements