Java is a flexible programming language, which allow developers to write code that would run on any machine, regardless of architecture or platform. Core Java is the part of Java programming language used to develop Computer, Mobile or Web applications.
Which topics are covered? Variables, Data types, Operators, Control Statements, Strings, Arrays and Functions – which is the the base for Advanced Java topics like JSP, Servlet, JDBC, RMI, Networking, Multithreading.
Let’s see a simple program to add two numbers:
public class AddTwoNumbers { public static void main(String[] args) { int num1 = 5, num2 = 15, sum; sum = num1 + num2; System.out.println("Sum of these numbers: "+sum); } }
Output:
Sum of these numbers: 20
Let’s see another example in which we get the values from user.
import java.util.Scanner; public class AddTwoNumbers2 { public static void main(String[] args) { int num1, num2, sum; Scanner sc = new Scanner(System.in); System.out.println("Enter First Number: "); num1 = sc.nextInt(); System.out.println("Enter Second Number: "); num2 = sc.nextInt(); sc.close(); sum = num1 + num2; System.out.println("Sum of these numbers: "+sum); } } Output:
Enter First Number: 110 Enter Second Number: 19 Sum of these numbers: 229
Get Live Online Training on Core Java and Advanced Java Programming from an expert trainer Dr. Geeta. She has 16+ years of teaching experience. You can interact with trainer and ask your queries live!
Course Contents:
Please download Course Contents PDF.
What will you get?
1. Practical Training
2. Assignments
3. Question Bank
Course Duration:
1.5 months
Limited period ‘Lockdown Discount Offer’
Regular Fees: Rs.9,400/-
Discounted Fees: Rs.6,500/
Save Rs.2,900/-
Offer valid till 31 May 2020.
Download Course Contents: