Ankith Reddy has Published 996 Articles

Java program to convert float decimal to Octal number

Ankith Reddy

Ankith Reddy

Updated on 25-Jun-2020 14:25:17

361 Views

We can convert any decimal number to its equivalent octal by following program.In this we reserve the reminder we get after divide the given number by 8 as it is the base of Octal and then reverse the order of reminders we have stored by multiplying each reminder by 10.Let ... Read More

JavaBean class in Java

Ankith Reddy

Ankith Reddy

Updated on 25-Jun-2020 14:22:20

4K+ Views

A JavaBean is a specially constructed Java class written in the Java and coded according to the JavaBeans API specifications.Following are the unique characteristics that distinguish a JavaBean from other Java classes −It provides a default, no-argument constructor.It should be serializable and that which can implement the Serializable interface.It may ... Read More

Referencing Subclass objects with Subclass vs Superclass reference

Ankith Reddy

Ankith Reddy

Updated on 25-Jun-2020 14:15:01

3K+ Views

In java inheritance some of the basic rules includes −Object relation of Superclass (parent) to Subclass (child) exists while child to parent object relation never exists.This means that reference of parent class could hold the child object while child reference could not hold the parent object.In case of overriding of ... Read More

strictfp Keyword in Java programming

Ankith Reddy

Ankith Reddy

Updated on 25-Jun-2020 14:12:11

284 Views

strictfp is used to ensure that floating points operations give the same result on any platform. As floating points precision may vary from one platform to another. strictfp keyword ensures the consistency across the platforms.strictfp can be applied to class, method or on interfaces but cannot be applied to abstract ... Read More

Perform Animation on CSS letter-spacing property

Ankith Reddy

Ankith Reddy

Updated on 25-Jun-2020 14:10:23

160 Views

To implement animation on the letter-spacing property with CSS, you can try to run the following codeExampleLive Demo                    p {             letter-spacing: 3px;             animation: mymove 3s infinite;          }          @keyframes mymove {             70% {                letter-spacing: 20px;             }          }                     I am flying!    

POJI in Java

Ankith Reddy

Ankith Reddy

Updated on 25-Jun-2020 14:07:52

527 Views

POJI is an acronym for Plain Old Java Interface which corresponds to a Java standard interface which means that these interfaces are in the context of providing services in JEE. For example, OSGI service is offered through POJI in JEEIn other terms we can say that POJI is an ordinary ... Read More

Get the list of all the declared methods in Java

Ankith Reddy

Ankith Reddy

Updated on 25-Jun-2020 14:07:31

1K+ Views

The list of all the declared methods can be obtained using the java.lang.Class.getDeclaredMethods() method. This method returns an array that contains all the Method objects with public, private, protected and default access. However, the inherited methods are not included.Also, the getDeclaredMethods() method returns a zero-length array if the class or ... Read More

Check for the availability of a package in Java

Ankith Reddy

Ankith Reddy

Updated on 25-Jun-2020 13:59:35

701 Views

The availability can be checked using the method java.lang.Class.forName(). The class object associated with the class with the given string name can be returned using the method java.lang.Class.forName(String name, boolean initialize, ClassLoader loader), using the class loader that is used to load the class.A program that demonstrates this is given ... Read More

Python Exception Base Classes

Ankith Reddy

Ankith Reddy

Updated on 25-Jun-2020 13:51:15

5K+ Views

Like other high-level languages, there are some exceptions in python also. When a problem occurs, it raises an exception. There are different kind of exceptions like ZeroDivisionError, AssertionError etc. All exception classes are derived from the BaseException class.The code can run built in exceptions, or we can also raise these ... Read More

Get the unqualified name of a class in Java

Ankith Reddy

Ankith Reddy

Updated on 25-Jun-2020 13:49:24

689 Views

A qualified class name in Java contains the package that the class originated from. In contrast to this, the unqualified class name contains only the class name without any package information. A program that gets the unqualified name of a class is given as follows:Example Live Demopublic class Demo {    public ... Read More

Advertisements