Java is an object-oriented programming language created by James Gosling. It was originally called Oak but was later renamed to Java. The document discusses the different editions of Java including J2SE, J2EE, and J2ME. It also covers key Java technologies like applets, servlets, JSP, and Swing. The document provides an overview of Java features such as being platform independent, portable, multi-threaded, and having a Java Virtual Machine. It also discusses concepts like inheritance, interfaces, packages, exceptions, and input/output in Java.
Here I discuss about Java programming language and easiest way to solve programming problem. Java basic syntax and their uses are described briefly so that anyone can easily understand within very short time. If anyone follow the slide with proper way,I assure that he or she will find java programming interesting.
Here I discuss about Java programming language and easiest way to solve programming problem. Java basic syntax and their uses are described briefly so that anyone can easily understand within very short time. If anyone follow the slide with proper way,I assure that he or she will find java programming interesting.
Core Java Tutorial. In case you want to get trained in Spring Framework you can refer here:
<a href="https://www.emexotechnologies.com/courses/java-development-training/core-java-training/">Java Training</a>
Learn about the basic fundamentals of java and important for the different company's interview. Topics like JRE, JDK, Java Keywords, Primitive DataTypes, Types of Variables, Logical, Shift and Bitwise Operator working, Command Line Argument, Handling Arrays, Array Copy, and different programs and output based programs.
In this core java training session, you will learn Handling Strings in Java. Topics covered in this session are:
• Memory Allocation & Garbage Collection
• Strings in Java
For more information about this course visit on this link: https://www.mindsmapped.com/courses/software-development/learn-java-fundamentals-hands-on-training-on-core-java-concepts/
Core Java Tutorial. In case you want to get trained in Spring Framework you can refer here:
<a href="https://www.emexotechnologies.com/courses/java-development-training/core-java-training/">Java Training</a>
Learn about the basic fundamentals of java and important for the different company's interview. Topics like JRE, JDK, Java Keywords, Primitive DataTypes, Types of Variables, Logical, Shift and Bitwise Operator working, Command Line Argument, Handling Arrays, Array Copy, and different programs and output based programs.
In this core java training session, you will learn Handling Strings in Java. Topics covered in this session are:
• Memory Allocation & Garbage Collection
• Strings in Java
For more information about this course visit on this link: https://www.mindsmapped.com/courses/software-development/learn-java-fundamentals-hands-on-training-on-core-java-concepts/
In this session, you will learn:
1. Deep dive into coding OOP with Java… with practical examples.
2. How to create a class
3. How to create objects
4. How to create instance variables
5. How to create class variables
6. Constructors
In this session you will learn:
Deep dive into coding OOP with Java… with practical examples.
How to create a class
How to create objects
How to create instance variables
How to create class variables
Constructors
For more information: https://www.mindsmapped.com/courses/software-development/become-a-java-developer-hands-on-training/
Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...Udayan Khattry
Assess your preparation with these Practice Test Questions with Explanation. Questions are Extracted from Highest Rated Course on Udemy which has helped a lot of students to pass the exam with good score.
500+ multiple choice questions with explanation to assess Oracle Certified Associate, Java SE 8 Programmer II preparation.
Highest Rated course on UDEMY
Read the students success stories at:
https://udayankhattry.com/ocp/
Enroll now to receive maximum discount on the course ie. for just $9.99 or ₹640.00, click the link below- https://www.udemy.com/java-ocp/?couponCode=UDAYANKHATTRY.COM
To avail maximum discount on all courses visit: www.udayankhattry.com
Why is Java relevant? New features of Java8 xshyamx
Presentation slides from ISDC2013 held on 16-mar-2013
http://www.siliconindia.com/events-overview/India--Software-Developer-Conference-Bangalore-ISDC_2013Blr.html
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
The Art Pastor's Guide to Sabbath | Steve ThomasonSteve Thomason
What is the purpose of the Sabbath Law in the Torah. It is interesting to compare how the context of the law shifts from Exodus to Deuteronomy. Who gets to rest, and why?
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
We all have good and bad thoughts from time to time and situation to situation. We are bombarded daily with spiraling thoughts(both negative and positive) creating all-consuming feel , making us difficult to manage with associated suffering. Good thoughts are like our Mob Signal (Positive thought) amidst noise(negative thought) in the atmosphere. Negative thoughts like noise outweigh positive thoughts. These thoughts often create unwanted confusion, trouble, stress and frustration in our mind as well as chaos in our physical world. Negative thoughts are also known as “distorted thinking”.
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
2. What is JAVA?
Java is an object-oriented programming
language developed by James Gosling at Sun
Microsystems and released in 1995.
Old Name : Oak
Green Project (7 members team)
Write Once Run Anywhere (WORA)
13. import java.io.*;
class Test
{
public static void main(String []ar) throws Exception
{
int age;
DataInputStream d = new DataInputStream(System.in);
System.out.println("Enter your Age");
age = Integer.parseInt(d.readLine());
System.out.println("Age:"+ age);
}
}
15. import java.io.*;
class Test
{
public static void main(String []ar) throws Exception
{
int age;
BufferedReader d = new BufferedReader(new
InputStreamReader(System.in));
System.out.println("Enter your Age");
age = Integer.parseInt(d.readLine());
System.out.println("Age:"+ age);
}
}
16. import java.util.Scanner;
class Test
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter your rollno");
int rno=sc.nextInt();
System.out.println("Enter your name");
String name=sc.next();
System.out.println("Rollno:"+rno);
System.out.println(" name:"+name);
sc.close();
}
17. Final, finally, finalizer
• Final
1. Variable (CONSTANT)
final int TOTAL=100;
2. Method (can’t be override)
final int add(){}
3. Class (can’t inherited)
final class Test{ .. }
18. Finally
Exception Handling
What is Exception? Runtime error
Eg:-
ArrayIndexoutofBounds Exception
int a = new int[10];
a[11]=123;
ClassNotFoundException
19. Throws informing the compiler about the
occurrence of an exception (eg:- Questions
without answer)
Try block & Catch block (eg:- Q & A)
Try block (Q: intimation about the occurrence of
an error to java compiler)
Catch block (A: Solution ie remedy for that
exception)
20. import java.io.*; //for DataInputStream class
class Test
{
public static void main(String []ar) throws Exception
{
int age;
DataInputStream d = new DataInputStream(System.in);
System.out.println("Enter your Age");
age = Integer.parseInt(d.readLine()); //IOException
System.out.println("Age:"+ age);
}
}
21. class Test
{
public static void main(String []ar)
{
try
{
int a=100,b=0,c;
c=a/b;
}
catch (Exception e) //ArithmeticException division by zero
{
System.out.println(e);
}
}
}
22. • try block must be followed by a single or
multiple catch block.
• finally block
Is executed once whether the exception is
raised or not.
House keeping operations like file closing &
freeing resources
23. class Test
{
public static void main(String []ar)
{
try
{
int a=100,b=0,c;
c=a/b;
}
catch (Exception e) //ArithmeticException division by zero
{
System.out.println(e);
}
finally
{
System.out.println(“finally block”);
}
}
}
25. Inheritance
• Deriving a new class from existing class.
• Old class or existing class (Super Class)
• New class or derived class (Sub Class)
Reusability
26. Types of Inheritance
1. Single Inheritance
2. Multiple Inheritance
3. Hierarchical inheritance
4.MultiLevel Inheritance
5.Hybrid inheritance
33. Single Inheritance
class A
{
static int x=10;
static int y=20;
}
class B extends A
{
public static void main(String[] args)
{
int z=30;
int res=x+y+z;
System.out.println("Result:"+res);
}
}
34. class Shape
{ int l,b;
}
class Rectangle extends Shape
{
int a;
public int findArea()
{
a = l*b;
return (a);
}
public static void main(String args[])
{
Rectangle r = new Rectangle();
r.l = 10;
r.b = 20;
System.out.println("Area of rectangle is:" + r.findArea());
}
}
35. Interface
Similar to class but contains only declarations of
variables and methods.
• Methods declared in a interface should
be public and abstract
(final Vs abstract)
• variables declared should be public, static &
final
36. Interface
Tagging or Markable interface?
An interface with no variables & methods
eg:-
Serializable, Clonnable and Remote interface
37. Interface pgm
interface P
{
void print();
}
class A implements P
{
public void print()
{ System.out.println("Hello"); }
public static void main(String args[])
{
A obj = new A();
obj.print();
}
}
38. Multiple Inheritance
class A
{
static int x=10;
}
interface B
{
static int y=20;
}
class C extends A implements B
{
public static void main(String[] args)
{
System.out.println("Multiplication:"+ x*y);
}
39. Multiple Inheritance
class A
{ }
class B ________________ A
{}
interface I1
{}
class C ________________ B _________________ I
{}
Interface I2 _____________ I1
{}
x extends y
x implements y
40. Constructor & Destructor
Constructor A method which is invoked
automatically while creating objects.
Constraints:
• Constructor name should be same as class
name.
• No return value for constructor. (even void)
46. Super keyword
• super can be used to refer immediate parent
class instance variable.
• super can be used to invoke immediate parent
class method.
• super() can be used to invoke immediate
parent class constructor.
49. this keywordclass A
{
int a,b;
int add(int x, int y)
{
a=x;
b=y;
return(a+b);
}
}
class B extends A
{
public static void main(String args[])
{
A a=new A();
System.out.println("Added Value:" + a.add(10,20));
}
}
50. class A
{
int x,y;
int add(int x, int y)
{
this.x=x;
this.y=y;
return(x+y);
}
}
class B extends A
{
public static void main(String args[])
{
A a=new A();
System.out.println("Added Value:" + a.add(10,20));
}
}
51. Method Overloading
• Same method name with different signatures.
Signature?
• Number and type of arguments.
int add(int a, int b);
int add(int a, int b, int c);
double add(int a, double b);
52. //Method Overloading
class A
{
int add(int x, int y)
{
return(x+y);
}
int add(int x, int y, int z)
{
return(x+y+z);
}
double add(double x, int y)
{
return(x+y);
}
}
53. class B extends A
{
public static void main(String args[])
{
A a=new A();
System.out.println("Added Value:" + a.add(10,20));
System.out.println("Added Value:" + a.add(10,20,30));
System.out.println("Added Value:" + a.add(1.2,20));
}
}
54. Constructor Overloading
• More than one types of constructor used in a
single class.
• Method Overriding
• Same method name with same signature but in
2 different classes namely super class & sub
class.
Overloading Vs Overriding?
55. // method overriding
class A
{
void show()
{
System.out.println("I am inside super class");
}
}
class B extends A
{
void show()
{
System.out.println("I am inside sub class");
}
}
57. Abstract class
• A class which can’t be instantiated.
Ie we can’t create objects for abstract class.
How to create abstract class in Java?
1. Using abstract class.
2. Using at least one abstract method inside a
class.
3. An abstract class contains both abstract & non
abstract methods.
62. • Some Built-in Packages
1) java.lang: defines primitive data types, math
operations
2) java.io: supporting input / output operations.
3) java.util: data structures like Linked List, Date / Time
operations.
4) java.applet: Contains classes for creating Applets.
5) java.awt: graphical user interfaces
6) java.net: networking operations.
63. Advantages of using packages:
• Preventing naming conflicts
• Easier maintenance
• Controlled access
64. User defined package
//create a folder mypack and save Mycls.java in mypack
package mypack;
public class Mycls
{
public void getName(String s)
{
System.out.println(s);
}
}
//compile Mycls.java
65. import mypack.Mycls;
public class Test
{
public static void main(String args[])
{
Mycls m = new Mycls();
m.getName("VIIMS");
}
}
//cd..
//compile Test.java & run
// Output:- VIIMS
66. //static keyword
import static java.lang.System.*;
class Test
{
public static void main(String b[])
{
out.println("Welcome");
}
}
67. // Naming conflicts
• import java.util.*;
• import java.sql.*;
Date today ;
//ERROR– java.util.Date or java.sql.Date?
Solution:
java.sql.Date today = new java.sql.Date();
68. APPLETS
• Small java programs developed for web
applications.
console applications Vs Applets
1. main() 1. No main()
2. No browser 2. needs browser or
appletviewer
69. Lifecycle of Java Applet
java.applet.Applet class
• public void init(): is used to initialized the Applet.
It is invoked only once.
• public void start(): is invoked after the init()
method or browser is maximized. It is used to
start the Applet.
• public void stop(): is used to stop the Applet. It is
invoked when Applet is stop or browser is
minimized.
• public void destroy(): is used to destroy the
Applet. It is invoked only once.
71. >javac First.java
Include <applet> tag in 2 ways
1. In java program itself as comment line and
run using appletviewer
>appletviewer First.java
2. As a separate .html file and run using any
browser.
72. First.java
/*
<applet code="First.class" width="300" height="300">
</applet>
*/
import java.applet.Applet;
import java.awt.Graphics;
public class First extends Applet
{
public void paint(Graphics g)
{
g.drawString("welcome",150,150);
g.drawLine(20,30,20,300);
}
}
74. JDBC (Java Database Connectivity)
• Front End
• Backend
DBMS Vs RDBMS
• ODBC vs JDBC
75. SQL
1. DDL
i. Create
ii. Alter
iii. Drop
2. DML
i. Select
ii. Insert
iii. Update
iv. Delete
3. DCL
i. grant
ii. Revoke
4. TCL
i. Commit
ii. Rollback
iii. Save Point
76. Creating a Tableimport java.sql.*;
class Test
{
public static void main(String a[]) throws Exception
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con =
DriverManager.getConnection("Jdbc:Odbc:stucon");
String qs = "create table student(sname text,rno number)";
PreparedStatement ps = con.prepareStatement(qs);
ps.executeUpdate();
ps.close();
con.close();
}
}
77. Select Queryimport java.sql.*;
class Test
{
public static void main(String a[]) throws Exception
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("Jdbc:Odbc:empcon");
String qs = "select * from EMPLOYEE";
PreparedStatement ps = con.prepareStatement(qs);
ResultSet rs = ps.executeQuery();
while(rs.next())
{
System.out.println("Employee No :" + rs.getString(1));
System.out.println("Employee Name:" + rs.getString(2));
System.out.println("Salary Rs :" + rs.getString(3));
}
ps.close();
con.close();
}
}