package com.javavogue; public class SingletonDemo { static SingletonDemo obj; private SingletonDemo(){ } public static SingletonDemo getInstance(){ if(obj!=null){ return obj; }
Continue readingAuthor: javavogue
Reverse a Number in Java
In this program we will reverse a number in java using for loop , while loop and recursion .Reversing a
Continue readingJava program to check prime number
A number which is divided by one and itself is called prime number. For Example 7 is a prime number
Continue readingHow to print array without using loop in java
How to print array in java without loop is frequently asked question in interview. We can print array without using
Continue readingJava Program to Find Largest Element of an Array
In this tutorial we will write java program to find largest number in array java . We have different methods
Continue readingProgram For nth Fibonacci Number in Java
The Fibonacci numbers are the numbers in the following integer sequence. 0, 1, 1, 2, 3, 5, 8, 13, 21,
Continue readingActivator Eclipse Command is not working In PlayFramwork
When i run activator eclipse command then i get following error. [info] Set current project to demo (in build file:/home/anuj/playapp/demo/)[error]
Continue readingjava.lang.UnsupportedClassVersionError: com/typesafe/config/ConfigException : Unsupported major.minor version 52.0
java.lang.UnsupportedClassVersionError: com/typesafe/config/ConfigException : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
Continue readingHow to sort a TreeSet with user defined objects In Java
TreeSet have element in their natural ordering. If we make a TreeSet of Sting it have elements in alphabetical ascending
Continue readingScala Variables
Variable is a name of reversed memory area of any values. In scala we can declare a variable with var
Continue reading