Introduction to Java

What’s Java? Java is simply an object oriented multi-threaded programming language. It’s a platform for application development. A platform is the hardware or software environment in which your program runs. Java is a software-only platform that run on hardware-based platforms. Java Environment: Cross –platform portability Java support cross –platform portability via JVM. JVM is an abstract computing machine, having an instruction set and memory. Platform-independent Java compiler translates java program into an intermediate language called Java byte codes and puts them into a .class file.…

Continue reading »

Core Java interview questions in thread programming

Thread: A thread is a section of code executed independently with in a program. Multithreading is an execution of the multitasking paradigm, where instead multiple program, multithreading involves multiple thread within a single program. A main() method in the java program creates the main thread. When a java application begins, the java virtual machine creates a java thread referred to as the main thread for you program. The different types of creating thread in a java program is, Implementing Runnable Interface, extending Thread class. Create…

Continue reading »

Common programming questions asked in core java interview

Factorial Example: //CodeParent Presents Factorial Example public class FactCode { public static void main(String[] args) { int i, factout = 1; int factcode = 5; // The number to be calculated for factorial for (i = 1; i <= factcode; i++) { factout = factout * i; } System.out.println("Code Parent Presents Factorial Code !!!"); System.out.println("Factorial of " + factcode + " is: " + factout); } } Output: Code Parent Presents Factorial Code !!! Factorial of 5 is: 120 Fibonacci Example: //CodeParent presents Fibonacci Code…

Continue reading »