Style Select Options with CSS

Nishtha Thakur
Updated on 23-Jun-2020 15:28:35

2K+ Views

To style the options in , you can try to run the following code,ExampleLive Demo                    select {             width: 100%;             padding: 10px 15px;             border: 1px dashed blue;             border-radius: 4px;             background-color: orange;          }                     Learn,                             Java             Ruby             Oracle             Tableau                    

Jagged Array in Java

Chandu yadav
Updated on 23-Jun-2020 15:28:13

4K+ Views

Jagged array is a multidimensional array where member arrays are of different size. For example, we can create a 2D array where first array is of 3 elements, and is of 4 elements. Following is the example demonstrating the concept of jagged array.Example Live Demopublic class Tester {    public static void main(String[] args){       int[][] twoDimenArray = new int[2][];       //first row has 3 columns       twoDimenArray[0] = new int[3];       //second row has 4 columns       twoDimenArray[1] = new int[4];       int counter = ... Read More

Set Bordered Form Inputs with CSS

Chandu yadav
Updated on 23-Jun-2020 15:27:59

165 Views

To set border to form inputs, use the CSS border property.You can try to run the following code to add borderExampleLive Demo                    input[type = text] {             width: 100%;             padding: 10px 15px;             margin: 5px 0;             box-sizing: border-box;             border: 3px inset orange;          }                     Fill the below form,                Subject                    Student                    

Add Space Inside a Form's Text Field with CSS

Prabhas
Updated on 23-Jun-2020 15:26:31

10K+ Views

To add space inside a form’s text field, use the CSS padding property.You can try to run the following code to achieve this:ExampleLive Demo                    input[type = text] {             width: 100%;             padding: 10px 15px;             margin: 5px 0;             box-sizing: border-box;          }                     Fill the below form,                Subject                    Student                    

Java instanceof and Its Applications

Ankith Reddy
Updated on 23-Jun-2020 15:25:56

617 Views

instanceof operator is used to check the type of object passed. Following rules explain the usage of instanceof operator in Java.instanceof operator returns true for the object if checked against its class type.instanceof operator returns false for the object if checked against its type which is not in its hierarchy.instanceof operator returns true for the child object if checked against parent object type.instanceof operator returns true for the complete object hierarchy up to the Object class.instanceof operator returns false for the null value.instanceof operator returns false for the parent object if checked against child object type.Following example showcases the above ... Read More

Style Input Fields of a Form with CSS

Smita Kapse
Updated on 23-Jun-2020 15:25:45

367 Views

To style the input field of a form, you can try to run the following code. Style the :ExampleLive Demo                    input {             width: 100%;          }                     Fill the below form,                Subject                    Student                    

Select All Elements with rel=nofollow using CSS

usharani
Updated on 23-Jun-2020 15:25:05

333 Views

Use the [attribute = ”value”] selector to select elements with a specified attribute and value.You can try to run the following code to implement the CSS [attribute="value"] Selector. Here, we have considered the attribute as rel,ExampleLive Demo                    a[rel = nofollow] {             border: 3px solid blue;          }                     Uber's Business Model       Share          Market    

Java 8 Optional Class

Chandu yadav
Updated on 23-Jun-2020 15:24:33

520 Views

Optional is a container object used to contain not-null objects. Optional object is used to represent null with absent value. This class has various utility methods to facilitate code to handle values as 'available' or 'not available' instead of checking null values. It is introduced in Java 8 and is similar to what Optional is in Guava.Class DeclarationFollowing is the declaration for java.util.Optional class −public final class Optional extends ObjectClass MethodSr.No.Method & Description1static Optional empty()Returns an empty Optional instance.2boolean equals(Object obj)Indicates whether some other object is "equal to" this Optional.3Optional filter(PredicateRead More

ListIterator in Java

Arjun Thakur
Updated on 23-Jun-2020 15:23:49

421 Views

The java.util.LinkedList.listIterator(int index) method returns a list-iterator of the elements in this list (in proper sequence), starting at the specified position in the list.DeclarationFollowing is the declaration for java.util.LinkedList.listIterator() methodpublic ListIterator listIterator(int index)Parametersindex − index of the first element to be returned from the list-iteratorReturn ValueThis method returns a ListIterator of the elements in this list (in proper sequence), starting at the specified position in the listExceptionIndexOutOfBoundsException − if the index is out of rangeExampleThe following example shows the usage of java.util.LinkedList.listIterator() method.Example Live Demopackage com.tutorialspoint; import java.util.*; public class LinkedListDemo {    public static void main(String[] args) { ... Read More

Retain Style Values with CSS Keyframes

Ankith Reddy
Updated on 23-Jun-2020 15:23:03

134 Views

To set the elements to retain the style values set by the last keyframe, use the animation-fill-mode property with the backwards value.ExampleLive Demo                    div {             width: 150px;             height: 200px;             position: relative;             background: red;             animation-name: myanim;             animation-duration: 2s;             animation-fill-mode: backwards;          }          @keyframes myanim {             from {left: 0px; background-color: green;}             to {left: 200px; background-color: blue;}          }                        

Advertisements