Why Final Class used in Java?

Vikyath Ram
Updated on 30-Jul-2019 22:30:24
The final keyword is used with a class to create a final class. The final class cannot be inherited and so the final keyword is commonly used with a class to prevent inheritance.A program that demonstrates a final class in Java is given as follows:Example Live Demofinal class A {    private int a = 9;    public void printA() {       System.out.println("Value of a = " + a);    } } public class Demo {    public static void main(String args[]) {       A obj = new A();       obj.printA();    } }OutputValue of ... Read More

Why is Greenland called as island and not a continent?

Vandana Rao
Updated on 30-Jul-2019 22:30:24
Greenland is actually a huge island on the North American plate in the pink color. It’s surely got a load of ice on it, much of which shapes as a part of the Arctic polar ice cap, but there is a land below Greenland. Tagging Greenland is actually an ice sheet implicit that it’s drifting on water as an unarranged part of the much larger.Scientists call those islands continents which has a completely different tectonic plate. The continental outer layer also has to be firm. Unlikeness of the flora and fauna of the location is also taken into deliberation while ... Read More

What does Q in LGBTQ stand for?

Updated on 30-Jul-2019 22:30:24
We commonly hear the word LGBTQ community used for the gay community. LGBT means lesbian, gay, bisexual and transgender. But many people wonder what is this Q?Q stands for either "Questioning" or "Queer".Queer has many meanings. It means one may be any one of those letters (L, G, B, T) or could be all of those, and it encompasses people who may not be even aware of that. Not knowing about that is also considered OK.Q even stands for "Questioning" where someone is trying to figure out their gender identity and still questioning their sexual orientation who come under this community.Read More

How can a man strike balance between his mother and wife?

Prasanna Kotamraju
Updated on 30-Jul-2019 22:30:24
It is very important for a man to strike balance between the two important ladies in his life. This is because a man’s life will not be complete without a Mother’s care and affection or a Wife’s love and support.The relation between the Saas-Bahu will always be a power struggle when it comes to the man. Each of them tries to win the upper hand in his life. A man can consider himself the luckiest if both of them realize that, each one is equally important in his life and their role is irreplaceable, hence there is no need to ... Read More

Fill elements in a Java long array in a specified range

karthikeya Boyini
Updated on 30-Jul-2019 22:30:24
Elements can be filled in a Java long array in a specified range using the java.util.Arrays.fill() method. This method assigns the required long value in the specified range to the long array in Java.The parameters required for the Arrays.fill() method are the array name, the index of the first element to be filled(inclusive), the index of the last element to be filled(exclusive) and the value that is to be stored in the array elements.A program that demonstrates this is given as follows −Example Live Demoimport java.util.Arrays; public class Demo { public static void main(String[] argv) throws Exception { ... Read More

What should I do? Select int as currency or convert int to currency format in MySql?

Vrundesha Joshi
Updated on 30-Jul-2019 22:30:24
To convert int to current format, use CONCAT() with FORMAT() function from MySQL.The syntax is as follows −SELECT CONCAT(‘CurrencySymbol’, FORMAT(yourColumnName, valueAfterDecimal)) as AnyVariableName from yourTableName;To understand the above syntax, let us create a table. The query to create a table −mysql> create table AddingCurrencySymbolDemo −> ( −> Amount int −> ); Query OK, 0 rows affected (1.50 sec)Insert records in the table using insert command. The query is as follows −mysql> insert into AddingCurrencySymbolDemo values(250); Query OK, 1 row affected (0.22 sec) mysql> insert into AddingCurrencySymbolDemo values(500); Query OK, 1 ... Read More

What is sharing, blogging and publishing?

Knowledge base
Updated on 30-Jul-2019 22:30:24
The advancement of social media has introduced many terms to us. Some of those terms are sharing, blogging and publishing. Let us understand what do they mean.BloggingBlogging is one of them. Blogs are the pages where you can create the content and can share with the world. Writing your content in blogs is called Blogging. This content can be anything like stories, experiences, reviews, opinions, criticisms, explanations, etc. whichever you want to share with the world. The famous blogging site is blogspot.comPublishingPublishing is posting the content on to your blog page. By clicking this Publish, you are finalizing your content ... Read More

How was the writing style of Wordsworth different from Coleridge?

Ridhi Arora
Updated on 30-Jul-2019 22:30:24
Both, Wordsworth and Coleridge were famous poets of their time, but both received praise for their own distinct writing styles.ColeridgeSamuel Taylor Coleridge is a popular name among Romantic poets who were influenced by the French Revolution. He was a leader of the British Romantic movement and was born on October 21, 1772, in Devonshire, England.Features of Coleridge’s PoetryTreatment of the Supernatural: He treats the supernatural in such a manner that it becomes convincing and at the same time, in some sense, a criticism of life.Suspension of Disbelief: The way in which Coleridge has achieved the willing suspension of disbelief has ... Read More

What are the other expressions for the word ‘Amazing’?

Vihan Rodrigues
Updated on 30-Jul-2019 22:30:24
Stop using ‘Amazing’ and end up being considered an amateur! Rather, try these expressions instead and get labelled as seasoned.AdorableAlluringAmbrosialAstonishingAstoundingAwe-InspiringAwesomeBeauteousBeautifulBewitchingBeyond WordsBlue-ribbonBonnyBreathtakingBrilliantCapitalCaptivatingCharmingClassyDarlingDauntingDazzlingDelectableDelicateDeliciousDelightfulDevineElegantEnchantingEnthrallingEnticingEtherealExaltedExcellentExceptionalExhilaratingExquisiteExtraordinaryFabulous (absolutely, dahling!)FantasticFascinatingFearsomeFetchingFirst-classFirst-rateGloriousGorgeousGracefulGrandHeavenlyIdealImpressiveIncomparableInconceivable (for my fellow Princess Bride fans)IncredibleIndescribableIneffableInspiringIrresistibleLovelyLusciousMagneticMagnificentMajesticMarvelousMesmerizingOutstandingProdigiousRadiantRapturousRavishingRefinedResplendentSavoryScrumptiousSensualSexyShockingSpectacularSplendidStaggeringStrikingStunningStupefyingSublimeSuperbSupremeSurprisingTantalizingThrillingTop-notchTranscendentTremendousUnbelievableUnearthlyUnutterableUpliftingWonderfulWondrousYummyAnd, if you totally amazed then this one.... (+_ +)Amazeballs

Get first and last elements from Vector in Java

Vikyath Ram
Updated on 30-Jul-2019 22:30:24
The first element in the Vector can be obtained using the java.util.Vector.firstElement() method. The last element in the Vector can be obtained using the java.util.Vector.lastElement() method. Neither of these methods requires any parameters.A program that demonstrates this is given as follows:Example Live Demoimport java.util.Vector; public class Demo { public static void main(String args[]) { Vector vec = new Vector(); vec.add(4); vec.add(7); vec.add(2); vec.add(8); ... Read More