Vanithasree has Published 85 Articles

What is the difference between /* */ and /** */ comments in Java?

vanithasree

vanithasree

Updated on 30-Jul-2019 22:30:20

510 Views

Multiline comments (/* */) are used to comment multiple lines in the source code. Example Live Demo public class CommentsExample { /* Following is the main method here, We create a variable named ... Read More

Are there inline functions in Java?

vanithasree

vanithasree

Updated on 30-Jul-2019 22:30:20

2K+ Views

If a function is inline, the compiler places a copy of the code of that function at each point where the function is called at compile time. Any change to an inline function could require all clients of the function to be recompiled because compiler would need to replace all ... Read More

How do I write constants names in Java?

vanithasree

vanithasree

Updated on 30-Jul-2019 22:30:20

546 Views

While writing the name of the constants it is suggested to write all the letters in upper case. If constant contains more than one word they should be separated by underscore (_). Example Live Demo public class ConstantsTest { public static final int ... Read More

What is the difference between simple name, canonical name and class name in a Java class?

vanithasree

vanithasree

Updated on 30-Jul-2019 22:30:20

2K+ Views

Canonical name of a Java class is the name of the class along with the package. For example, the canonical name of the class File is java.io.File. You can also get the canonical name of a particular class using Java method. The class named Class provides a method getCanonicalName(), this ... Read More

What is the number wrapper class and its methods in Java?

vanithasree

vanithasree

Updated on 30-Jul-2019 22:30:20

259 Views

The Number class (abstract) of the java.lang package represents the numeric values that are convertible to primitive types byte, double, float, int, long, and short. Following are the method provided by the Number class of the java.lang package. Sr.No Method & Description 1 byte byteValue() This ... Read More

Previous 1 ... 5 6 7 8 9
Advertisements