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
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
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
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);
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
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); } }
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
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
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.
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;
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP