- 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
A file or directory with the required abstract pathname can be deleted when the program ends i.e. after the virtual machine terminates using the method java.io.File.deleteOnExit(). This method requires no parameters and it does not return a value.A program that demonstrates this is given as follows −Example Live Demoimport java.io.File; public class Demo { public static void main(String[] args) { try { File file = new File("demo1.txt"); file.createNewFile(); System.out.println("File: " + file); file.deleteOnExit(); } catch(Exception e) { ... Read More
Being techy, I have tried almost all the existing search engines up till now and finally, I have come to the conclusion that Google stands way above than the rest at least for the time being. Know exactly why?Google search engine uses a powerful tool to filter your search. Without Google, it is practically impossible to find information based on your need.Google uses a special algorithm to generate results and however, it shares the general information and facts about its algorithm but the specifics are confidential and are a company secret.Google uses automated programs named Spider or Crawler and what ... Read More
To store query result in a variable with MySQL, use the SET command. The syntax is as follows −SET @anyVariableName = ( yourQuery);To understand the above concept, let us create a table. The following is the query to create a table −mysql> create table QueryResultDemo −> ( −> Price int −> ); Query OK, 0 rows affected (0.59 sec)Now let us insert some records into the table. The following is the query to insert records −mysql> insert into QueryResultDemo values(100); Query OK, 1 row affected (0.17 sec) mysql> insert into QueryResultDemo values(20); Query OK, 1 row ... Read More
Use the remove() method to remove a key only if it is associated with a given value.Let’s say the following is our HashMap −// Create a hash map HashMap hm = new HashMap(); // Put elements to the map hm.put("Bag", new Integer(1100)); hm.put("Sunglasses", new Integer(2000)); hm.put("Frames", new Integer(800)); hm.put("Wallet", new Integer(700)); hm.put("Belt", new Integer(600));Here, we are removing a key “Belt” only if it is associated with the given value 600 −hm.remove("Belt", 600);The following is an example to remove a key only if it is associated with a given value −Example Live Demoimport java.util.*; public class Demo { public static void ... Read More
Birla is one of the names which needs no introduction in India. Birla, the brand name of a number of products, is the family name of a Marwari family which hails from Rajasthan. Besides being the largest business tycoons, they are into several social activities also. From the highly reputed institutes like BITS and Birla Schools to the Birla temples constructed all over India, their contribution is in many sectors in India.Aditya Birla GroupThe founder of Aditya Birla Group was Shri Seth Shiv Narayan Birla in 1857. This is an Indian multinational conglomerate that operates in 40 countries having interests ... Read More
Hindu or Indu is the word, derived from the river Indus, which flows in the North-western part of India. The Greeks used to mention the people beyond this river as “Indu”s, naming after the Indus river. As this Indus river is locally called as Sindhu, the people were also called as Sindhus.The OriginHowever, the Arabic people used to call the people beyond the Indus river as “Al-Hind” which was later turned to be “Hind”s or Hindus. The land of Hindus was called as Hindustan, which later on became India, probably after the British invasion.The civilization surrounding this river is also ... Read More
God is believed to be a supreme entity who is omnipresent, omnipotent, omniscience and benevolent. Actually, it is a simple scientific and psychological thinking that if you have somebody to look after you, then you need not worry about your responsibilities. But of course, you should fulfill your responsibilities.Let me explain in simpler terms. When a boy goes to the beach to play unknowing of any hidden dangers though, the father who is watching gives an assurance to the child that he will take care of serious peril. If the child falls off while running or if his sand castles ... Read More
Yes. We can find the word dictionary in a dictionary. When I referred to the Oxford Dictionary, I came across the following meaning.Dictionary: A book or electronic resource that lists the words of a language (typically in alphabetical order) and gives their meaning, or gives the equivalent words in a different language, often also providing information about pronunciation, origin, and usage.Usage:-- ‘I'll look up 'love' in the dictionary’-- ‘the website gives access to an online dictionary’
The dictionary meaning of Intolerance is “unwillingness to accept views, beliefs, or behavior that differs from one's own”.India, the so-called “Sone ki Chidiya” is now a land of controversies coming up every now and then even on a trivial matter. Many of them are spread just to get the limelight while the rest to actually show discontentment or public envy of some sort. Atrocities against minority and Dalit citizens have become frighteningly commonplace.The Responsibility of Our IconsAbout a year ago or so, Actor Aamir Khan was trolled for putting his opinion over "rising intolerance" in India, saying his wife Kiran ... Read More
A file can be set to read-only by using the method java.io.File.setReadOnly(). This method requires no parameters and it returns true if the file is set to read-only and false otherwise. The method java.io.File.canWrite() is used to check whether the file can be written to in Java and if not, then the file is confirmed to be read-only.A program that demonstrates this is given as follows −Example Live Demoimport java.io.File; public class Demo { public static void main(String[] args) { boolean flag; try { File file = new File("demo1.txt"); ... Read More