Articles on Trending Technologies

Technical articles with clear explanations and examples

What is the most interesting thing you have come across today?

Shankar Bhatt
Shankar Bhatt
Updated on 25-Jun-2020 248 Views

I am a huge movie-buff and digging out casual info about cinema and celebrities is something I love to do in my leisure. Today, as soon as I hit my phone in a casual mood, and googled how Kamal Hasan’s latest release is doing at the box office, I clapped eyes on a very interesting fact, which will be easy for you to understand after checking out this image.Now, you see right below the name Kamal Haasan, Indian Politician is mentioned. I don’t know but this fell on me as a sheer surprise. Many folks including me consider him (and ...

Read More

Get the name of a primitive type in Java

Anvi Jain
Anvi Jain
Updated on 25-Jun-2020 2K+ Views

The getName() method is used to get the names of the entities such as primitive type, interface, class, array class, void etc. that represented by the class objects. These names are returned in the form of a string.A program that gets the name of a primitive type using getName() method is given as follows -Example Live Demopublic class Demo {    public static void main(String[] argv) throws Exception {       String name1 = float.class.getName();       System.out.println(name1);       String name2 = int.class.getName();       System.out.println(name2);       String name3 = char.class.getName();       ...

Read More

Display the declared methods of java.lang.Math

Nancy Den
Nancy Den
Updated on 25-Jun-2020 180 Views

The methods of the java.lang.Math class can be listed using the java.lang.Class.getDeclaredMethods() method. This method returns an array that contains all the Method objects with public, private, protected and default access. However, the inherited methods are not included. Also, the getDeclaredMethods() method returns a zero length array if the class or interface has no methods or if a primitive type, array class or void is represented in the Class object.A program that demonstrates this is given as follows −Example Live Demoimport java.lang.reflect.Method; public class Demo {    public static void main(final String[] args) {       final Method[] methods = Math.class.getDeclaredMethods(); ...

Read More

Generate Random double type number in Java

Smita Kapse
Smita Kapse
Updated on 25-Jun-2020 8K+ Views

In order to generate Random double type numbers in Java, we use the nextDouble() method of the java.util.Random class. This returns the next random double value between 0.0 (inclusive) and 1.0 (exclusive) from the random generator sequence.Declaration - The java.util.Random.nextDouble() method is declared as follows −public float nextDouble()Let us see a program to generate random double type numbers in Java −Example Live Demoimport java.util.Random; public class Example {    public static void main(String[] args) {       Random rd = new Random(); // creating Random object       System.out.println(rd.nextDouble()); // displaying a random double value between 0.0 & 1.0   ...

Read More

Check if a large number is divisible by 3 or not in java

Arjun Thakur
Arjun Thakur
Updated on 25-Jun-2020 5K+ Views

If the sum of the digits of a number is divisible by 3, then the number is divisible by 3.Some examples of numbers divisible by 3 are as follows.The number 85203 is divisible by 3 because the sum of its digits (8 + 5 + 2 + 0 + 3 = 18) is divisible by 3.The number 79154 is not divisible by 3 because the sum of its digits (7 + 9 + 1 + 5 + 4 = 26) is not divisible by 3.Programimport java.util.Scanner; public class DivisibleBy3 {    public static void main(String args[]) {       Scanner sc = new Scanner(System.in);       System.out.println("Enter a number :");       String num = sc.nextLine();       int digitSum = 0;             for(int i = 0; i

Read More

What are some social media terms I need to know now?

Shankar Bhatt
Shankar Bhatt
Updated on 25-Jun-2020 178 Views

Chatbots − Little bots can answer questions and give information based on queries in natural written language. It is also possible to place orders with them. Many companies already use chatbots. Among them are Uber, Sephora, KLM, and Whole Foods.Microblogging − Short message postings from a social media account. Facebook statuses and Twitter posts are two examples.Tweeps − Twitter + People = Tweople. Twitterati is also used for Twitter users.Meme − A means of taking viral concepts and making them everyday lingo.User-Generated-Content (UGC) − An article describes UGC as being Latin for "crap" which is, quite frankly, well-put. UGC is ...

Read More

JSON. stringify( ) function in JavaScript

karthikeya Boyini
karthikeya Boyini
Updated on 25-Jun-2020 300 Views

The stringify() function of a JSON object accepts a JSON string, and constructs an object based on the given text and, returns it.SyntaxIts Syntax is as followsJson.stringify();Example Live Demo    JavaScript Example           var jsonSample = '{Tutorial: Java, Version:8}';       jsonObj = JSON.stringify(jsonSample);       document.write(jsonObj);     Output"{Tutorial: Java, Version:8}"

Read More

Check if a large number is divisible by 11 or not in java

Chandu yadav
Chandu yadav
Updated on 25-Jun-2020 2K+ Views

A number is divisible by 11 if the difference between the sum of its alternative digits is divisible by 11.i.e. if (sum of odd digits) – ( sum of even digits) is 0 or divisible by 11 then the given number is divisible by 11.Programimport java.util.Scanner; public class DivisibleBy11 {    public static void main(String args[]) {       Scanner sc = new Scanner(System.in);       System.out.println("Enter a number :");       String num = sc.nextLine();       int digitSumEve = 0;       int digitSumOdd = 0;            for(int i = 0; i

Read More

Display the current method name in Java

Smita Kapse
Smita Kapse
Updated on 25-Jun-2020 2K+ Views

The current method name that contains the execution point that is represented by the current stack trace element is provided by the java.lang.StackTraceElement.getMethodName() method.A program that demonstrates this is given as follows −Example Live Demopublic class Demo {    public static void main(String args[]) {       System.out.println       ("The method name is: " + new Exception().getStackTrace()[0].getMethodName());    } }OutputThe method name is: mainNow let us understand the above program.The method getMethodName() is used to obtain the current method name that contains the execution point that is represented by the current stack trace element. This is printed using ...

Read More

What are some amazing facts related to Facebook?

Madhuparna
Madhuparna
Updated on 25-Jun-2020 191 Views

As of the first quarter of 2018, Facebook had 2.19 billion monthly active users. In the third quarter of 2012, the number of active Facebook users had surpassed one billion, making it the first social network ever to do so. Active users are those, which have logged in to Facebook during the last 30 days.The number of mobile Facebook users across the globe in 2018 is 1.34 Billion.Facebook's total quarterly revenue as of the first quarter of 2018 has amounted to 11.96 billion U.S. dollars, the majority of which were generated through advertising.24 Aug 2015, a billion people used Facebook ...

Read More
Showing 42961–42970 of 61,248 articles
Advertisements