- 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 34484 Articles for Programming
![Giri Raju](https://www.tutorialspoint.com/assets/profiles/13536/profile/60_72105-1512540773.jpg)
4K+ Views
Call by Value means calling a method with a parameter as value. Through this, the argument value is passed to the parameter.While Call by Reference means calling a method with a parameter as a reference. Through this, the argument reference is passed to the parameter.In call by value, the modification done to the parameter passed does not reflect in the caller's scope while in the call by reference, the modification done to the parameter passed are persistent and changes are reflected in the caller's scope.But Java uses only call by value. It creates a copy of references and pass them ... Read More
![Ankitha Reddy](https://www.tutorialspoint.com/assets/profiles/13550/profile/60_73963-1512711511.jpg)
20K+ Views
HashMap is non-syncronized and is not thread safe while HashTable is thread safe and is synchronized. HashMap allows one null key and values can be null whereas HashTable doesn't allow null key or value. HashMap is faster than HashTable. HashMap iterator is fail-safe where HashTable iterator is not fail-safe. HashMap extends AbstractMap class where HashTable extends Dictionary class.
![Kiran Kumar Panigrahi](https://www.tutorialspoint.com/assets/profiles/390736/profile/60_2598-1635242143.png)
1K+ Views
Classes and objects are considered as the building blocks of object-oriented programming. Every entity with state and behavior is an object. Collection of these similar kinds of objects is a class. A class can be only accessed by its objects hence securing data in it. Read this article to learn more about objects and classes in Java and how they are different from each other. What are Classes in Java? A class is a user-defined data type that acts as a blueprint for designing the objects in it. It is said to be a container that stores objects of similar ... Read More
![Govinda Sai](https://www.tutorialspoint.com/assets/profiles/13542/profile/60_86497-1512650655.jpg)
13K+ Views
A command-line argument is an information that directly follows the program's name on the command line when it is executed. To access the command-line arguments inside a Java program is quite easy. They are stored as strings in the String array passed to main( ).ExampleThe following program displays all of the command-line arguments that it is called with -public class CommandLine { public static void main(String args[]) { for(int i = 0; i
![Abhinanda Shri](https://www.tutorialspoint.com/assets/profiles/13552/profile/60_73264-1512711555.jpg)
507 Views
Following program uses few of the important tags available for documentation comments. You can make use of other tags based on your requirements.The documentation about the AddNum class will be produced in HTML file AddNum.html but at the same time, a master file with a name index.html will also be created.import java.io.*; /** * Add Two Numbers! * The AddNum program implements an application that * simply adds two given integer numbers and Prints * the output on the screen. * * Note: Giving proper comments in your program makes it more ... Read More
![Sravani S](https://www.tutorialspoint.com/assets/profiles/13538/profile/60_67753-1512711355.jpg)
50K+ Views
Call by Value means calling a method with a parameter as value. Through this, the argument value is passed to the parameter.While Call by Reference means calling a method with a parameter as a reference. Through this, the argument reference is passed to the parameter.In call by value, the modification done to the parameter passed does not reflect in the caller's scope while in the call by reference, the modification done to the parameter passed are persistent and changes are reflected in the caller's scope.Following is the example of the call by value −The following program shows an example of ... Read More
![V Jyothi](https://www.tutorialspoint.com/assets/profiles/13530/profile/60_77592-1512648869.jpg)
733 Views
Following is a simple example of a single dimensional array.Example Live Demopublic class Tester { public static void main(String[] args) { double[] myList = {1.9, 2.9, 3.4, 3.5}; // Print all the array elements for (double element: myList) { System.out.print(element + " "); } } }Output1.9 2.9 3.4 3.5
![varun](https://www.tutorialspoint.com/assets/profiles/13559/profile/60_29674-1512637943.jpg)
201 Views
Java supports single dimensional and multidimensional arrays. See the example below:Example Live Demopublic class Tester { public static void main(String[] args) { double[] myList = {1.9, 2.9, 3.4, 3.5}; // Print all the array elements for (double element: myList) { System.out.print(element + " "); } System.out.println(); int[][] multidimensionalArray = { {1,2},{2,3}, {3,4} }; for(int i = 0 ; i < 3 ; i++) { //row for(int j = 0 ; j < 2; j++) { System.out.print(multidimensionalArray[i][j] + " "); } System.out.println(); } } }Output1.9 2.9 3.4 3.5 1 2 2 3 3 4
![vanithasree](https://www.tutorialspoint.com/assets/profiles/13547/profile/60_85216-1512542720.jpg)
2K+ Views
Following are various methods of Object class −protected Object clone() - Used to create and return a copy of this object. boolean equals(Object obj) - Used to indicate whether some other object is "equal to" this one.protected void finalize() - garbage collector calls this method on an object when it determines that there are no more references to the object.Class getClass() - Used to get the runtime class of this Object.int hashCode() - Used to get a hash code value for the object.void notify() - Used to wake up a single thread that is waiting on this object's monitor.void notifyAll() - ... Read More