Posts

Showing posts with the label A Day in Noida: Learning Begins

A Day in Noida: Learning Begins

Image
Today was my first day in Apex Pvt Ltd and I have learnt the basic elements of Java. These elements are given below: 1. What are the uses of println() and printf? Ans: println( )  prints a new blank line and then your message.  printf() provides string formatting similar to the printf function in C .  printf() is primarily needed when you need to print big strings to avoid string concatenation in println() which can be confusing at times (Although both can be used in almost all cases). Eg. int a = 10;int b = 20;  println("a: " + a + " b: " + b);      //Tedious String Concatenation printf("a: %d b: %d\n", a, b);     // Output using string formatting.  While printf() enables you to print fractional outputs up to any decimal place in a single line, the same task using println() can get very complex. 2. What is the use of Java? Ans: Java is a programming language that developers us...