- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 34494 Articles for Programming
![Rajendra Dharmkar](https://www.tutorialspoint.com/assets/profiles/9963/profile/60_124173-1512724240.jpg)
3K+ Views
The act of renaming multiple files recursively in Python can be a useful task when it is required to change the names of multiple files within a directory and its subdirectories. If you need to replace certain characters, add prefixes or suffixes, or completely change the file names, Python has powerful tools to accomplish such operations. In this article, we explore a few different approaches to renaming multiple files recursively using Python. We consider some code examples, each demonstrating a unique method to achieve this task. So let us get started right away and learn how to rename multiple files ... Read More
![vanithasree](https://www.tutorialspoint.com/assets/profiles/13547/profile/60_85216-1512542720.jpg)
561 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 num. And, print its value * */ public static void main(String args[]) { //Declaring a variable named num int num = 1; ... Read More
![Rajendra Dharmkar](https://www.tutorialspoint.com/assets/profiles/9963/profile/60_124173-1512724240.jpg)
8K+ Views
There are times when you want to organize your files or update the directory names to better reflect their contents. In such scenarios, the operation of renaming directories becomes helpful and it is a common task that we often encounter in Python file management. There is provision of several modules and methods in Python that makes renaming directories an easy task. In this article, we explore different ways how you can rename directories using Python code. You will learn this skill by practicing the code examples and explanations discussed in this article. Making Use of the OS Module ... Read More
![mkotla](https://www.tutorialspoint.com/assets/profiles/13540/profile/60_41073-1512640012.jpg)
457 Views
To comment a particular line just place ‘double back slash (//)’ before the line as shown below. // Hello this line is commented Example Following example demonstrates the usage of single line comments in Java. Live Demo public class CommentsExample { public static void main(String args[]) { //Declaring a variable named num int num = 1; //Printing the value of the variable num System.out.println("value if the variable num: "+num); } } Output value if the variable num: 1
![Sreemaha](https://www.tutorialspoint.com/assets/profiles/13570/profile/60_64977-1512709068.jpg)
525 Views
The java.lang package is the default package in Java, by default, it will be imported. Therefore, there is no need to import this package explicitly. i.e. without importing you can access the classes of this package. Example If you observe the following example here we haven’t imported the lang package explicitly but, still, we are able to calculate the square root of a number using the sqrt() method of the java.lang.Math class. Live Demo public class LangTest { public static void main(String args[]) { int num = 100; ... Read More
![varma](https://www.tutorialspoint.com/assets/profiles/13568/profile/60_26300-1512638592.jpg)
736 Views
Before running Java programs on your machine you need to set two environment variables namely, PATH − The path environment variable is used to specify the set of directories which contains execution programs.When you try to execute a program from command line, the operating system searches for the specified program in the current directly, if available, executes it.In case the programs are not available in the current directory, operating system verifies in the set of directories specified in the ‘PATH’ environment variable.CLASSPATH − The classpath environment variable is used to specify the location of the classes and packages.When we try ... Read More
![usharani](https://www.tutorialspoint.com/assets/profiles/13564/profile/60_32161-1512638316.jpg)
9K+ Views
Java provides two types of branching/control statements namely, break and continue.The break statementThis statement terminates the loop or switch statement and transfers execution to the statement immediately following the loop or switch.ExampleFollowing is the example of the break statement. Here we are trying to print elements up to 10 and, using break statement we are terminating the loop when the value in the loop reaches 8.Live Demopublic class BreakExample { public static void main(String args[]){ for(int i=0; i
![mkotla](https://www.tutorialspoint.com/assets/profiles/13540/profile/60_41073-1512640012.jpg)
6K+ Views
The static keyword is used to create methods that will exist independently of any instances created for the class. Static methods do not use any instance variables of any object of the class they are defined in. Static methods take all the data from parameters and compute something from those parameters, with no reference to variables. We can inherit static methods in Java. Example In the example we are creating a class named Demo and, declared a static method named display(). We created another class Sample, extended the Demo class and tried to access the display() method using the sub ... Read More
![varun](https://www.tutorialspoint.com/assets/profiles/13559/profile/60_29674-1512637943.jpg)
10K+ Views
To generate Java docs for your project you need to write the required information about the field, method or class as./** * * The method prints a simple message on the Console. * */Then to generate the document follow the steps given below −Step 1 − Open eclipse, select the option Project →Generate Javadoc.Step 2 − Select the javadoc.exe file from the bin folder of java installation directory, select the destination folder for the generated java doc and select Next.Step 3 − Type the title of the documentation in the Document title and select thefinish button.Step 4 ... Read More
![Giri Raju](https://www.tutorialspoint.com/assets/profiles/13536/profile/60_72105-1512540773.jpg)
2K+ Views
A static inner class is a nested class which is a static member of the outer class. It can be accessed without instantiating the outer class, using other static members. Just like static members, a static nested class does not have access to the instance variables and methods of the outer class. You can extend static inner class with another inner class. Example Live Demo public class SampleClass { static abstract class Test{ int num = 300; public abstract void display(); ... Read More