karthikeya Boyini

karthikeya Boyini

1,421 Articles Published

Articles by karthikeya Boyini

Page 69 of 143

Bootstrap .btn-lg class

karthikeya Boyini
karthikeya Boyini
Updated on 11-Mar-2026 271 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

How to use #undef directive in C#?

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

The #undef directive allows you to undefine a symbol. The following is the syntax −#undef SYMBOLFor example,#undef OneIt evaluates to false when used along with #if directive. Let us see an example −Example#define One #undef Two using System; namespace Demo {    class Program {       static void Main(string[] args) {          #if (One && TWO)          Console.WriteLine("Both are defined");          #elif (ONE && !TWO)          Console.WriteLine("ONE is defined and TWO is undefined");          #elif (!ONE && TWO)          Console.WriteLine("ONE is defined and TWO is undefined");          #else          Console.WriteLine("Both are undefined");          #endif       }    } }OutputBoth are undefined

Read More

How to print a blank line in C#?

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

To display a line in C#, use the Console.WriteLine().Under that set a blank line −Console.WriteLine(" ");The following is the code that displays a blank line −Exampleusing System; namespace Program {    public class Demo {       public static void Main(String[] args) {          Console.WriteLine(" ");          Console.WriteLine("Displayed a blank line above!");          Console.ReadLine();       }    } }OutputDisplayed a blank line above!

Read More

Calling a method using null in Java

karthikeya Boyini
karthikeya Boyini
Updated on 11-Mar-2026 761 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 241 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

C# program to get max occurred character in a String

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

To get the maximum occurred character in a string, loop until the length of the given string and find the occurrence.With that, set a new array to calculate −for (int i = 0; i < s.Length; i++)    a[s[i]]++; }The values we used above −String s = "livelife!"; int[] a = new int[maxCHARS];Now display the character and the occurrence −for (int i = 0; i < maxCHARS; i++)    if (a[i] > 1) {       Console.WriteLine("Character " + (char) i);       Console.WriteLine("Occurrence = " + a[i] + " times");    }Let us see the complete code ...

Read More

Return a C# tuple from a method

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

Firstly, create a tuple as shown below that calls a method.var tuple = Show();The above statement calls the following method −static Tuple Show()Under the method, return the tuple as shown below −Exampleusing System; public class Demo {    public static void Main() {       var tuple = Show();       Console.WriteLine(tuple.Item1);       Console.WriteLine(tuple.Item2);       Console.WriteLine(tuple.Item3);       Console.WriteLine(tuple.Item4);       Console.WriteLine(tuple.Item5);    }    static Tuple Show() {       return Tuple.Create(3, 5, 7, 9, 11);    } }Output3 5 7 9 11

Read More

clone() method in Java

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

Java provides an assignment operator to copy the values but no operator to copy the object. Object class has a clone method which can be used to copy the values of an object without any side-effect. Assignment operator has a side-effect that when a reference is assigned to another reference then a new object is not created and both the reference point to the same object. This means if we change the value in one object then same will reflect in another object as well. clone() method handles this problem. See the below example.Examplepublic class Tester {    public static ...

Read More

What are postfix operators in C#?

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

The increment operator is ++ operator. If used as postfix on a variable, the value of the variable is first returned and then gets incremented by 1. It is called Postfix increment operator. In the same way, the decrement operator works but it decrements by 1.For example,a++;The following is an example showing how to work with postfix operator −Exampleusing System; class Program {    static void Main() {       int a, b;       a = 10;       Console.WriteLine(a++);           b = a;       Console.WriteLine(a);       Console.WriteLine(b);    } }Output10 11 11

Read More

Force an element to be hidden with Bootstrap

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

Use the .hidden class in Bootstrap to force an element to be hiddenExample           Bootstrap Example                                 This is visible.       This is hidden.    

Read More
Showing 681–690 of 1,421 articles
« Prev 1 67 68 69 70 71 143 Next »
Advertisements