Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles by Lakshmi Srinivas
Page 14 of 24
Add the default styles for the dropdown menu container in Bootstrap
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 MoreAdd plain text next to a form label within a form with Bootstrap
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 MoreSet active state for Bootstrap Buttons
To set the active state for Bootstrap Buttons, use the .active class.The button will appear pressed as in the following codeExample Bootstrap Example The following are some buttons: Default Button Active Button
Read MoreHide content depending on screen size with Bootstrap
Use the .hidden-* class in Bootstrap to hide content depending on screen size with BootstrapExample Bootstrap Example This is visible. This is hidden. Hidden on small screen Hidden on medium screen
Read MoreImage Thumbnail with Bootstrap
To add a thumbnail to the image, use the .img-thumbnail Bootstrap class.You can try to run the following code to add a thumbnail to imagesExample Bootstrap Images Styling images with Bootstrap Original Image Thumbnail Image
Read MoreWhat is the difference between super and this, keywords in Java?
The this is a keyword in Java which is used as a reference to the object of the current class. Using it you can − Differentiate the instance variables from local variables if they have same names, within a constructor or a method. Call one type of constructor (parametrized constructor or default) from other in a class. It is known as explicit constructor invocation. Example class Superclass { int age; Superclass(int age) { this.age = age; } public void ...
Read MoreHow to return an array from a method in Java?
We can return an array in Java from a method in Java. Here we have a method createArray() from which we create an array dynamically by taking values from the user and return the created array.Exampleimport java.util.Arrays; import java.util.Scanner; public class ReturningAnArray { public int[] createArray() { Scanner sc = new Scanner(System.in); System.out.println("Enter the size of the array that is to be created:: "); int size = sc.nextInt(); int[] myArray = new int[size]; System.out.println("Enter the elements of the array ::"); for(int i=0; i
Read MoreJava program to print ASCII value of a particular character
In this article, we will learn to print the ASCII value of a particular character in Java. ASCII (American Standard Code for Information Interchange) is a standard encoding system that assigns a unique numeric value to characters like letters, digits, and symbols. We’ll explain the concept of ASCII, demonstrate how to retrieve and display ASCII values in Java and provide practical examples to help you understand and apply this concept effectively. What Is ASCII? ASCII is a character encoding standard where each character (letters, digits, and symbols) is assigned a numeric value. For instance − ...
Read MoreJava program to find the roots of a quadratic equation
In this article, we will learn to find the roots of a quadratic equation using Java. The roots of a quadratic equation are determined by the following formula: $$x = \frac{-b\pm\sqrt[]{b^2-4ac}}{2a}$$ Here we will take input values for the coefficients 𝑎, 𝑏, and 𝑐 of the quadratic equation 𝑎 𝑥 2 + 𝑏 𝑥 + ...
Read MoreJava program to find the sum of elements of an array
To find the sum of elements of an array.create an empty variable. (sum)Initialize it with 0 in a loop.Traverse through each element (or get each element from the user) add each element to sum.Print sum.Exampleimport java.util.Arrays; import java.util.Scanner; public class SumOfElementsOfAnArray { public static void main(String args[]){ System.out.println("Enter the required size of the array :: "); Scanner s = new Scanner(System.in); int size = s.nextInt(); int myArray[] = new int [size]; int sum = 0; System.out.println("Enter the elements of the array one by one "); for(int i=0; i
Read More