Found 31903 Articles for Programming

What is the best IDE for Java besides Eclipse?

varma
Updated on 30-Jul-2019 22:30:20
IntelliJ and NetBeans are the alternative IDE’s for Java development.

How to change the mode of a file using Python?

Rajendra Dharmkar
Updated on 03-Oct-2019 05:48:30
To change the permission of a file, you can use the os.chmod(file, mode) call. Note that the mode should be specified in octal representation and therefore must begin with a 0o. For example, to make a file readonly, you can set the permission to 0o777, you can use:>>> import os >>> os.chmod('my_file', 0o777)You can also use flags from the stat module. You can read more about these flags here: http://docs.python.org/2/library/stat.htmlAnother way to acheive it is using a subprocess call:>>> import subprocess >>> subprocess.call(['chmod', '0444', 'my_file'])

What is Java run time environment?

usharani
Updated on 30-Jul-2019 22:30:20
Java Run Time Environment is a piece of software which contains JVM and other libraries required to execute Java programs.

What are the major features of Java programming?

varun
Updated on 30-Jul-2019 22:30:20
Following are the notable features of Java:Object OrientedIn Java, everything is an Object. Java can be easily extended since it is based on the Object model.Platform IndependentUnlike 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.SimpleJava is designed to be easy to learn. If you understand the basic concept of OOP Java, it would be easy to master.SecureWith Java's secure feature ... Read More

What is the difference between Object oriented programming and Object based programming?

Prabhas
Updated on 30-Jul-2019 22:30:20
Many of us have a misconception that Java script is an object oriented language. But, the truth is Java Script is an Object Based Language. Object Based languages are different from Object Oriented Languages: Object Based Languages Object based languages supports the usage of object and encapsulation. They does not support inheritance or, polymorphism or, both. Object based languages does not supports built-in objects. Javascript, VB are the examples of object bases languages. Object Oriented Languages Object Oriented Languages supports all the features of Oops including inheritance and polymorphism. They support built-in objects. C#, Java, VB. Net ... Read More

How to concatenate two files into a new file using Python?

Rajendra Dharmkar
Updated on 13-Dec-2019 07:04:59
To merge multiple files in a new file, you can simply read files and write them to a new file using loops.For examplefilenames = ['file1.txt', 'file2.txt', 'file3.txt'] with open('output_file', 'w') as outfile:     for fname in filenames:         with open(fname) as infile:             outfile.write(infile.read())If you have very big files, instead of writing them at once, you could write them line by line.For examplefilenames = ['file1.txt', 'file2.txt', 'file3.txt'] with open('output_file', 'w') as outfile:     for fname in filenames:         with open(fname) as infile:           ... Read More

What are basic Object oriented programming concepts?

seetha
Updated on 30-Jul-2019 22:30:20
The basic Object-oriented programming concepts are:Inheritance Inheritance can be defined as the process where one (parent/super) class acquires the properties (methods and fields) of another (child/sub). With the use of inheritance, the information is made manageable in a hierarchical order.Polymorphism Polymorphism is the ability of an object to perform different actions (or, exhibit different behaviors) based on the context.Abstraction Abstraction is a process of hiding the implementation details from the user, only the functionality will be provided to the user. In other words, the user will have the information on what the object does instead of how it does it.In Java, ... Read More

What are the prerequisites for learning Java?

vanithasree
Updated on 30-Jul-2019 22:30:20
In fact, you can directly start learning Java without any prior knowledge of programming language. But, the syntax in Java is similar to the syntax of the C programming language, therefore, Knowing C language helps to get hold of Java quickly. Having introduced to object-oriented principles before starting Java, also helps in the understanding of the language so, having an idea on object-oriented languages such as C++ also helps. In short, if you know C or C++ it will be a little bit easier to cope with Java technology.

What are the differences between C and Java?

radhakrishna
Updated on 18-Feb-2020 07:39:49
Following are the notable differences between C and Java –                                       Java                                               CJava is an object-oriented language.C is procedure oriented languageJava is interpreted Language.C is a compiled language.Java is a high-level language.C is a low-level language.Java does not support pointers.C supports pointersJava supports inheritanceC does not support inheritance

How to merge multiple files into a new file using Python?

Sarika Singh
Updated on 18-Aug-2022 08:00:00
Python makes it simple to create new files, read existing files, append data, or replace data in existing files. With the aid of a few open-source and third-party libraries, it can manage practically all of the file types that are currently supported. We must iterate through all the necessary files, collect their data, and then add it to a new file in order to concatenate several files into a single file. This article demonstrates how to use Python to concatenate multiple files into a single file. Using Loops A list of filenames or file paths to the necessary python files ... Read More
Advertisements