Set Important Information for a List Item in a List Group with Bootstrap

Ankith Reddy
Updated on 15-Jun-2020 06:29:08

110 Views

use the list-group-item-info class in Bootstrap to set key information for a list item in a list group.You can try to run the following code to implement the list-group-item-info class −ExampleLive Demo           Bootstrap Example                                          Java                                      Interfaces                                        Multi-threading                                        Packages                                

Set All List Items on a Single Line with Bootstrap

Nishtha Thakur
Updated on 15-Jun-2020 06:27:53

2K+ Views

To set all list items on a single line, use the .list-inline class.You can try to run the following code to implement the .list-inline class −ExampleLive Demo           Bootstrap Example                                          Technologies                       Home             PHP             Java             jQuery             JavaScript             Ruby                    

Create a Small Button with Bootstrap

Smita Kapse
Updated on 15-Jun-2020 06:26:19

3K+ Views

Use the .btn-sm class in Bootstrap to create a small button.You can try to run the following code to create button smaller than the default size −ExampleLive Demo           Bootstrap Example                                 Click below if you want to know the warning message:       Warning       Click below if you want to know the result:       Result    

Declare a Boolean in JavaScript

Ayyan
Updated on 15-Jun-2020 06:24:05

2K+ Views

To declare a Boolean in JavaScript, you need to assign true or false value.var answer = true;ExampleTo learn about the working of Boolean, let’s see the following example −Live Demo           JavaScript Boolean                        var num1 = 10;          var num2 = 20;          document.write(num1 > num2);          

Disable Pagination Link with Bootstrap

karthikeya Boyini
Updated on 15-Jun-2020 06:23:56

1K+ Views

Use the .disabled class in Bootstrap with the .pagination to disable a pagination link.You can try to run the following code to disable pagination linkExampleLive Demo           Bootstrap Example                                              Java Tutorial          The following are the lessons of Java Tutorial:                       1             2             3             4             5             6             7             8                    

Java Variable Widening Example

Jai Janardhan
Updated on 15-Jun-2020 05:56:52

1K+ Views

Widening refers to passing a lower size data type like int to a higher size data type like long. No casting is required in such a case.public class MyFirstJavaProgram {    public static void main(String []args) {       int a = 300;       long b = a;       System.out.println(b);    } }

Java Conversions and Promotions

Paul Richard
Updated on 15-Jun-2020 05:55:04

176 Views

We can convert one data types into another data type using casting. Narrowing ConversionNarrowing refers to passing a higher size data type like int to a lower size data type like short. It may lead to data loss. Following program output will be 44.public class MyFirstJavaProgram {    public static void main(String []args) {       int a = 300;       byte b = (byte)a; // narrowing       System.out.println(b);    } }Widening/Promotion ConversionWidening refers to passing a lower size data type like int to a higher size data type like long. public class MyFirstJavaProgram {    public ... Read More

Java Overflow and Underflow

Arjun Thakur
Updated on 15-Jun-2020 05:47:33

3K+ Views

OverflowOverflow occurs when we assign such a value to a variable which is more than the maximum permissible value.UnderflowUnderflow occurs when we assign such a value to a variable which is less than the minimum permissible value.JVM does not throw any exception in case Overflow or underflow occurs, it simply changes the value. Its programmer responsibility to check the possibility of an overflow/underflow condition and act accordingly. Example (Overflow)Consider the case of int variable, it is of 32 bit and any value which is more than Integer.MAX_VALUE (2147483647) is rolled over. For example, Integer.MAX_VALUE + 1 returns -2147483648 (Integer.MIN_VALUE).As int data ... Read More

Java Variable Declaration Best Practices

Fendadis John
Updated on 15-Jun-2020 05:46:54

2K+ Views

Following are the best practices while declaring a variable.Variables names should be short or long enough as per the scope. For example, loop counter variable, i is fine whereas employee as a loop variable.Specific words should not be used as equals, compare, data.Use meaningful names which can explain the purpose of the variable. For example cnt Vs counter.Don't use _ to declare a variable name, Use camel casing. For example, employeeName is better than employee_name.Each organization has its own syntax specific standards. Follow those rules to maintain consistency and readability.

Avoid Increment (++) and Decrement (--) Operators in JavaScript

Rahul Sharma
Updated on 15-Jun-2020 05:41:11

504 Views

The increment and decrement operators should be avoided since it can lead to unexpected results. Here are some of the conditions:In an assignment statement, it can lead to unfavorable results:ExampleLive Demo                    var a = 5;          var b = ++a; var c = a++;          var d = ++c;          document.write(a);          document.write("\r"+b);          document.write("\r"+c);          document.write("\r"+d);           OutputWhitespace between the operator and variable can also lead to unexpected results:a = b = c = 1; ++a ; b -- ; c;

Advertisements