0% found this document useful (0 votes)
8 views40 pages

Java Programming - Introduction

The document outlines a Java programming course, detailing the teaching and examination scheme, course outline, and teaching methodology. It covers key topics such as object-oriented programming, data types, control statements, and provides resources for learning. The course emphasizes practical applications and continuous evaluation through unit tests and internal exams.

Uploaded by

moneytalks036
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views40 pages

Java Programming - Introduction

The document outlines a Java programming course, detailing the teaching and examination scheme, course outline, and teaching methodology. It covers key topics such as object-oriented programming, data types, control statements, and provides resources for learning. The course emphasizes practical applications and continuous evaluation through unit tests and internal exams.

Uploaded by

moneytalks036
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Java Programming - Introduction

Jalpesh Vasa ([email protected])


Smt. K. D. Patel Department of Information Technology
Outline…
• Teaching and Examination Scheme
• Course Outline
• Teaching Methodology
• Overview of Topics
Teaching and Examination
Scheme
Theory Practical Total
Teaching Scheme Credit
Hours Hours Hours
Hours/week 2 2 4
3
Marks 100 50 150

75 % attendance lecture and 100 % in


lab are mandatory
Teaching and Examination
Scheme

Teaching Scheme Internal External Total Th+Pr


HackerRank+N
PTEL+File+Int. Practical +
Practical (25+25) Practical Viva(25)
50

Exam(25)
UT1 + 150
classtest/quiz+
University Exam
Theory(30+70) NPTEL +
(70)
100
Presentation
(30)
Course Outline
Sr. Title of the unit Hours
No.
1. Fundamental of Object-Oriented Programming 3
2. Class Fundamentals 4
3. Array & String Handling 4
4. Inheritance, Interfaces & Packages 5
5. Exceptions Handling 4
6. Multithreaded Programming 4
7. GUI Programming & Lambdas and Streams 4
8. File I/O 2
Total hours (Theory): 30
Total hours (Lab): 30
Total hours: 60
Teaching Methodology
• Flipped classroom
• Upon completion of the unit, we shall take
on the session for doubt solving, however
you may post your doubts on the Google
classroom stream
• Provide feedback of sessions upon
completion of the day to enhance your
learning experience
Continuous Evaluation
• Unit tests (based on the practical only)
shall be conducted after completion of
some unit
• Internal practical exam is also conducted
Course Outcomes and Program
Objectives Mapping
Implement Object Oriented programming concept using basic
PO1: Engineering
CO1 syntaxes of control Structures, strings, and function for Knowledge
developing skills of logic building activity.
Use of a variety of basic control structures including selection and PO7: Environment and
repetition; classes and objects in a tiered architecture (user Sustainability,
CO2 interface, controller, and application logic layers) PO11: Project
Management & Finance
Demonstrates how to achieve reusability using inheritance, PO3:
CO3 interfaces, and packages and describes faster application Design/Development of
development that can be achieved. Solutions
Demonstrate understanding and use of different exception PO3:
CO4 handling mechanisms and concepts of multithreading for robust Design/Development of
faster and efficient application development. Solutions
Identify and describe common abstract user interface PO1: Engineering
CO5 components to design GUI in Java using Swing along with a Knowledge
response to events.
Identify, Design & develop complex Graphical user interfaces PO5: Modern Tool Usage
CO6 using principal Java Swing classes based on MVC architecture
Course Materials (Books)
Course Materials (Online Course)
• https://www.udemy.com/course/java-tutorial/ (Free)
• https://www.udemy.com/course/java-the-complete-java-
developer-course/ (Paid)
• https://education.oracle.com/java/java/pFamily_48
• https://www.mygreatlearning.com/academy/learn-for-
free/courses/java-programming
• https://www.scaler.com/topics/course/java-beginners/
• https://www.simplilearn.com/free-java-beginners-course-
skillup
• https://data-flair.training/courses/free-java-course/
• https://intellipaat.com/academy/course/java-training/
• https://www.upgrad.com/free-courses/
• https://java-programming.mooc.fi/
NPTEL Course (Online Course)
(Mandatory to appear for certification)
• https://onlinecourses.nptel.ac.in/noc24_cs
96/
Practical
• All practical will be assigned through
Google Classroom only. You will be given
specific problems which you suppose to
solve during the laboratory sessions.
Practical
• https://www.hackerrank.com/domains/java
Let’s Begin with Java Popularity
Why Learn Java
Real-World Java Application
Acrobat Reader, Media Player

Netflix, Tinder, Uber

Google Slides, Gmail

Car Audio, Wireless Computing

RMI, CORBA

Naukri, Jabong, Flipkart, Trivago

Research, Science, Space


How does Java Work?
Simple Java Program
public class MyInfromation{
String name;
int age;

void displayMyInformation(){
System.out.println(name+" "+age);
}
}
How to access the class?
public class MyMain {
public static void main(String args[]){
MyInformation m = new MyInformation();
m.displayMyInformation();
}
}
Useful terms for
this object-oriented (OO) language
public class MyInfromation{
Class
String name = “abc”;
int age = 30;

void displayMyInformation(){ state


System.out.println(name+" "+age);
}
Behavior
}
public class MyMain {
public static void main(String args[]){
MyInformation m = new MyInformation();
Object
m.displayMyInformation();
}
}
Object Oriented Programming
• Encapsulation
• Inheritance
• Polymorphism
• Abstraction
Data Types in Java
Data Types in Java
Primitive data types in Java are the basic data types that are used to store data in
variables. They are called primitive because they are not objects, and they do not
have any methods or properties.
There are eight primitive data types in Java:
Data Type Size Description
byte 1 byte Stores whole numbers from -128 to 127
short 2 bytes Stores whole numbers from -32,768 to 32,767
Stores whole numbers from -2,147,483,648 to
int 4 bytes
2,147,483,647
Stores whole numbers from -
long 8 bytes 9,223,372,036,854,775,808 to
9,223,372,036,854,775,807
Stores fractional numbers. Sufficient for storing 6 to 7
float 4 bytes
decimal digits
Stores fractional numbers. Sufficient for storing 15
double 8 bytes
decimal digits
boolean 1 bit Stores true or false values
char 2 bytes Stores a single character/letter or ASCII values
Non Primitive Data Types in Java
Non-primitive data types in Java are the data types that are not predefined by the Java
language. They are created by the programmer and are used to store more complex
data structures, such as arrays, classes, and interfaces.

There are five types of non-primitive data types in Java:


•Array - An array is a data structure that can store a collection of values of the
same type.
•Class - A class is a blueprint for creating objects. It defines the properties and
methods of an object.
•Interface - An interface is a contract between two classes. It specifies the
methods that a class must implement in order to comply with the interface.
•String - A string is a sequence of characters. It is stored as an object in Java.
•Object - An object is an instance of a class. It has the properties and methods
defined by the class.

Non-primitive data types are more complex than primitive data types and they require
more memory to store. However, they also offer more flexibility and functionality.
Type Casting
• Type casting is when you assign a value of one primitive data type to another type.
• In Java, there are two types of casting:

Widening Casting (automatically) - converting a smaller type to a larger type size


byte -> short -> char -> int -> long -> float -> double

• Narrowing Casting (manually) - converting a larger type to a smaller size type


double -> float -> long -> int -> char -> short -> byte
Type Casting
Data Operations in Java
Data Operations in Java
Data Operations in Java
Control Statement
Type Statement Description
Conditional if Executes a block of code if a certain condition is met.

Conditional else Executes a block of code if the condition in the if statement is not met.

Conditional switch Executes a block of code based on the value of a variable.


Executes a block of code repeatedly as long as a certain condition is
Looping while
met.
Executes a block of code repeatedly at least once, even if the condition
Looping do-while
is not met.

Looping for Executes a block of code a specific number of times.

Jump break Immediately terminates the current loop or switch statement.

Immediately skips the rest of the current iteration of the current loop and
Jump continue
continues with the next iteration.

Immediately terminates the current method and returns control to the


Jump return
caller.
Control Statement
// Conditional statement
if (score >= 60) {
System.out.println("Congratulations, you passed!");
} else {
System.out.println("Sorry, you failed.");
}
// Looping statement
int i = 0;
while (i < 10) {
System.out.println(i);
i++;
}
// Jump statement
for (int j = 0; j < 10; j++) {
if (j == 5) {
break;
}
System.out.println(j);
}
Control Statement
Java Comments
// Conditional statement
if (score >= 60) {
System.out.println("Congratulations, you passed!");
} else {
System.out.println("Sorry, you failed.");
}
// Looping statement
/*int i = 0;
while (i < 10) {
System.out.println(i);
i++;
}*/
// Jump statement
for (int j = 0; j < 10; j++) {
if (j == 5) {
break;
}
System.out.println(j);
}

You might also like