Found 34494 Articles for Programming

What is the root class in Java?

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

2K+ Views

The Object class of the java.lang package is the root class in Java i.e. It is the super class of every user-defined/predefined class n Java. All objects, including arrays, implement the methods of this class. The reason for this is to have common functionalities such as synchronization, garbage collection, collection support, object cloning for all objects in Java. The class named Class of java.lang package provides a method named getSuperclass() this method returns the Class representing the superclass of the current Class. So, Create a sample concrete class and try to get the name of its super class using this ... Read More

How to Compose a Raw Device Number from the Major and Minor Device Numbers?

Rajendra Dharmkar
Updated on 17-Jul-2023 14:40:46

165 Views

In identifying and interacting with hardware devices, device numbers have a significant role in the domain of low-level systems programming. Every device or peripheral that is connected to a computer system is given or assigned a unique pair of numbers called the major and minor device numbers. You have to comprehend how to compose a raw device number from these components and this is essential when interacting with device drivers or working with devices at a low level. In this article, we will set out on a journey to explore the procedure of composing a raw device number in Python. ... Read More

What is Java API and what is its use?

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

6K+ Views

The full form of API is Application Programming Interface. It is a document which gives you the list of all the packages, classes, and interfaces, along with their fields and methods.Using these API’s, the programmer can know how to use the methods, fields, classes, interfaces provided by Java libraries.

What is the difference between static classes and non-static inner classes in Java?

seetha
Updated on 16-Jun-2020 09:10:13

721 Views

Following are the notable differences between inner classes and static inner classes.Accessing the members of the outer classThe static inner class can access the static members of the outer class directly. But, to access the instance members of the outer class you need to instantiate the outer class.Examplepublic class Outer {    int num = 234;    static int data = 300;    public static class Inner{       public static void main(String args[]){          Outer obj = new Outer();          System.out.println(obj.num);          System.out.println(data);       }    } ... Read More

How to get the device major number from a raw device number using Python?

Rajendra Dharmkar
Updated on 20-Jul-2023 13:00:25

224 Views

Have you ever anytime wondered how the complex world of low-level system programming deals with the issue of device identification in Python? One essential item of data is the device major number; this plays a crucial role in identifying different devices in a system. In this article, we will set out on a journey to demystify the process of extracting the device major number from a raw device number using the power of Python. By the end of this article, you'll be equipped with the knowledge to navigate the realm of device identification with confidence. Understanding Device Major Numbers Before ... Read More

How to create softlink of a file using Python?

Rajendra Dharmkar
Updated on 13-Dec-2019 09:56:43

782 Views

The method os.symlink(src, dst) creates a symbolic link dst pointing to src. For example, if you have a file called photo.jpg and want to create a softlink/symbolic link to it called my_photo.jpg, then you could simply use:Example>>> import os >>> os.symlink('photo.jpg', 'my_photo.jpg')Now if you list the files in that directory, you'll get the my_photo.jpg there as well.

What is meant by Java being a dynamic language?

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

2K+ Views

Java is considered to be more dynamic than C or C++ since it is designed to adapt to an evolving environment. Java programs can carry an extensive amount of run-time information that can be used to verify and resolve accesses to objects at run-time.

How to create hardlink of a file using Python?

Rajendra Dharmkar
Updated on 13-Dec-2019 09:54:33

3K+ Views

The method os.link(src, dst) creates a hard link pointing to src named dst. This method is very useful to create a copy of existing file.ExampleFor example, if you have a file called photo.jpg and want to create a  hard link to it called my_photo.jpg, then you could simply use:>>> import os >>> os.link('photo.jpg', 'my_photo.jpg') Now if you list the files in that directory, you'll get the my_photo

What is meant by Java being an architecture neutral language?

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

4K+ Views

Unlike many other programming languages including C and C++, when Java is compiled, it is not compiled into platform specific machine, rather into platform-independent byte code. This byte code is distributed over the web and interpreted by the Virtual Machine (JVM) on whichever platform it is being run on. Thus when you write a piece of Java code in a particular platform and generated an executable code .class file. You can execute/run this .class file on any system the only condition is that the target system should have JVM (JRE) installed in it. In short, Java compiler generates an architecture-neutral ... Read More

What are the platforms that support Java programming language?

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

952 Views

Java runs on operating systems such as Windows, Mac OS, and the various versions of UNIX/Linux like HP-Unix, Sun Solaris, Redhat Linux, Ubuntu, CentOS, etc.

Advertisements