Posts

Showing posts from July, 2020

follow

STRINGS

 Strings are generally immutable in nature., Whereas StringBuffer & String Builder are mutable  Reason - Security is the reason for Strings they are made immutable. because with strings you can able to access databases and files. sometimes strings store passwords & usernames that cannot be modified StringBuffer - mutable, thread-safe StringBuilder - mutual, not thread-safe 'String' - Not a keyword, It is not a primitive data type, it is a derived type Security is the reason for Strings they are made immutable. because with strings you can able to access databases and files. sometimes strings store passwords & usernames which cannot be modified. String Constant Pool : It  is a Special memory Region where JVM stores String Instances What is the String Constant Pool? The  String Constant Pool  (also known as the  String Intern Pool ) is a special area within the Java heap where  string literals  are stored. When you create a string liter...

31 Mind blowing psychology facts

Image
31 Surprising psychology facts you should know 1.Sarcasm is a sign of a healthy brain People who could instantly use sarcasm in response to a trivial question have healthy minds.  Moreover, those who could understand cynicism well are also good at reading people’s minds.   2. A person still has 7 minutes of brain activity upon dying 3. The way you dress has a connection with your mood. It is  not just in the color that you choose to wear. Dressing well could also help in keeping you stable and happy. 4. Having a plan B would only make plan A less likely to work Every now and then, it hurts to be prepared. In a series of experiments from the  University of Pennsylvania , researchers found that when volunteers thought about a backup plan before starting a task, they did worse than those who hadn't thought about a plan B. What's more, when they realized they had options, their motivation for succeeding the first time around dropped. The researchers stress that t...

21 Suprising facts about Tea

Image
21 Suprising facts about Tea. 1. There are around 3000 different types of Tea. 2. Tea is really popular. It’s the most popular beverage in the world after plain water. The world’s tea market was worth $38.8 billion in 2013. 3. THE CHINESE HAVE BEEN DRINKING IT FOR MORE THAN 2000 YEARS …  Around 141 BCE, Han Dynasty Emperor Jing Di was buried with a wooden box containing important treasures he would need in the afterlife, including high-quality tea leaves. But his ancestors may have been enjoying tea for even longer than that. Chinese legend holds that the emperor Shen Nong first drank hot water accidentally infused with tea leaves way back in 2737 BCE. Regardless, until around 300 CE, it was considered a medicinal draught rather than a casual beverage. 4. TURKISH PEOPLE CONSUME THE MOST TEA.  Turks consume an average of almost seven pounds of tea per person annually. The Irish, in comparison, the world’s second-biggest tea drinkers, consume less than five pounds per person a y...