AmitDiwan has Published 10744 Articles

CSS Background Properties

AmitDiwan

AmitDiwan

Updated on 06-Jan-2020 07:53:52

2K+ Views

CSS background properties help us style the background of elements. The CSS background property is a shorthand for specifying the background of an element. background-color, background-image, background-repeat, background-position, background-clip, background-size, background-origin and background-attachment together comprise the CSS background properties.SyntaxThe syntax of CSS background property is as follows−Selector {    background: ... Read More

How to create and style borders using CSS?

AmitDiwan

AmitDiwan

Updated on 06-Jan-2020 07:41:25

113 Views

We can define borders for an element and style them using CSS. The CSS border property is used to define the border properties for an element. It is a shorthand for border-width, border-style and border-color. Furthermore, images can be specified as a border.SyntaxThe syntax of CSS border property is as ... Read More

CaseFormat Class in Java

AmitDiwan

AmitDiwan

Updated on 02-Jan-2020 11:07:50

103 Views

The CaseFormat class is a utility class for converting between various ASCII case formats −Modifier and TypeMethod and DescriptionObjectclone()Overrides Cloneable.booleanequals(Object obj)Overrides equals.String.format(double number)Specialization of format.abstract StringBufferformat(double number, StringBuffer toAppendTo, FieldPosition pos)Specialization of format.Stringformat(long number)Specialization of format.abstract StringBufferformat(long number, StringBuffer toAppendTo, FieldPosition pos)Specialization of format.ExampleLet us now see an example to ... Read More

NumberFormat class in Java

AmitDiwan

AmitDiwan

Updated on 02-Jan-2020 11:05:52

2K+ Views

NumberFormat helps you to format and parse numbers for any locale. It is the abstract base class for all number formats.Following are some of the methods of the NumberFormat class−Modifier and TypeMethod and DescriptionObjectclone()Overrides Cloneable.booleanequals(Object obj)Overrides equals.String.format(double number)Specialization of format.abstract StringBufferformat(double number, StringBuffer toAppendTo, FieldPosition pos)Specialization of format.Stringformat(long number)Specialization of ... Read More

Byte Class Fields in Java with example

AmitDiwan

AmitDiwan

Updated on 02-Jan-2020 11:00:57

168 Views

The Byte class wraps a value of primitive type byte in an object.Following are the fields for Byte class−static byte MAX_VALUE − This is constant holding the maximum value a byte can have, 27-1.static byte MIN_VALUE − This is constant holding the minimum value a byte can have, -27.static int ... Read More

Byte Class in Java

AmitDiwan

AmitDiwan

Updated on 02-Jan-2020 10:57:36

943 Views

The Byte class wraps a value of primitive type byte in an object. An object of type Byte contains a single field whose type is byte.Following are some of the methods of the Byte class −Sr.No.Method & Description1byte byteValue()This method returns the value of this Byte as a byte.2int compareTo(Byte ... Read More

What is the difference between echo, print, and print_r in PHP?

AmitDiwan

AmitDiwan

Updated on 02-Jan-2020 06:40:03

6K+ Views

The print and echo are both language constructs to display strings. The echo has a void return type, whereas print has a return value of 1 so it can be used in expressions. The print_r is used to display human-readable information about a variable.ExampleLet us now see an example that ... Read More

Function Overloading and Overriding in PHP

AmitDiwan

AmitDiwan

Updated on 02-Jan-2020 06:36:33

13K+ Views

Function Overloading in PHPFunction overloading is a feature that permits making creating several methods with a similar name that works differently from one another in the type of the input parameters it accepts as arguments.ExampleLet us now see an example to implement function overloading− Live DemoOutputThis will produce the following output−9.42648Function ... Read More

How to declare a global variable in PHP?

AmitDiwan

AmitDiwan

Updated on 02-Jan-2020 06:25:55

1K+ Views

A global variable can be accessed in any part of the program. However, in order to be modified, a global variable must be explicitly declared to be global in the function in which it is to be modified. This is accomplished, conveniently enough, by placing the keyword GLOBAL in front ... Read More

Comparing two dates in PHP

AmitDiwan

AmitDiwan

Updated on 02-Jan-2020 06:09:34

701 Views

To compare two dates in PHP, the code is as follows. Here, we have used the equality operator to compare dates −Example Live DemoOutputThis will produce the following output−Date1 = 2019-10-30 Date2 = 2019-10-30 Both the dates are equal!ExampleLet us now see another example− Live DemoOutputThis will produce the following output−Date1 = ... Read More

Advertisements