4G curriculum (older)
4343203 · Semester 4 · 4G scheme
Java Programming
Notes and solutions following the Gujarat Technological University (GTU) syllabus for 4343203. Independent material — not issued by the university.
Materials
Complete Book
The whole syllabus, unit by unit, written for the exam.
Complete Book
231 pages
Premium Preview · 45 pagesComplete Book (classic edition)
136 pages
Premium Preview · 22 pagesComplete Book (classic edition)
166 pages
Premium Preview · 46 pages
Detailed Notes
Lecture-by-lecture notes with worked examples.
Practicals & lab manual
59 pages
Premium Preview · 8 pagesPracticals & lab manual
185 pages
Premium Preview · 23 pages
Problem Solver
Step-by-step solutions to typical problems.
Problem Solver
35 pages
Premium Preview · 3 pages
PYQ Solutions
Past university papers, fully solved.
Solved past papers — detailed answers
280 pages · English + ગુજરાતી
Premium Preview · 38 pagesSolved past papers — short answers
102 pages · English + ગુજરાતી
Premium Preview · 4 pages
Syllabus units
Unit 1: Introduction to Java Programming Language8 h · 14 marks
- Introduction to Java and Brief history, java features, java Applications
- Java components: Java Virtual Machine (JVM), Java Runtime Environment (JRE), JDK (Java Development Kit). Importance of byte code and Garbage Collection
- Java environment setup; Structure of java program; Compilation and execution of java program, Comment Syntax
- Primitive Data Types: byte, short, int, long, float, double, char, Boolean
- Identifiers, Declarations of constants & variables, Type Conversion and Type Casting, Scope of variables
- Arrays of Primitive Data Types, Types of Arrays: one-dimensional and two-dimensional array
- Different Operators: Arithmetic, Bitwise, Rational, Logical, Assignment, Conditional, Ternary, Increment and Decrement
- Decision & Control Statements: Selection Statement (if, if...else, switch), Loops (while, do-while, for), Jump Statements: break, continue, return
Unit 2: Object Oriented Programming Concepts11 h · 18 marks
- Procedure-Oriented vs. Object-Oriented Programming concept
- Basics of OOP: Class, Object, Encapsulation, Polymorphism Abstraction, Inheritance
- Defining classes, fields and methods, creating objects
- Accessing rules: public, private, protected, default
- this keyword, static keyword, final keyword
- Constructors: Default constructors, Parameterized constructors, Copy constructors, Passing object as a parameter
- method overloading, constructor overloading
- Wrapper Classes, String Class and its methods: chatAt(), contains(), format(), length(), split()
- User Input: Scanner class
Unit 3: Inheritance, Packages & Interfaces11 h · 18 marks
- Basics of Inheritance, Types of inheritance: single, multiple, multilevel, hierarchical and hybrid inheritance
- method overriding, Object class and overriding its methods: equals(), toString(), finalize(), hashCode()
- Defining interface, implementing interface, multiple inheritance using interface
- Abstract class and final class
- Creating package, importing package, access rules for packages
Unit 4: Exception Handling & Multithreading6 h · 10 marks
- Types of errors, exceptions, try...catch statement, multiple catch blocks, throw and throws keywords, finally clause, uses of exceptions, user defined exceptions
- Concept of Multithreading, Creating thread, extending Thread class, implementing Runnable interface, life cycle of a thread, Thread priority, Thread exception handing in threads
Unit 5: File Handling and Collections Framework6 h · 10 marks
- Stream classes, class hierarchy, useful I/O classes: FileInputStream, FileOutputStream
- Creation of text file, reading and writing text files
- Collections Framework overview, Collection classes- ArrayList, LinkedList, HashSet. The For-Each loop
- Map class: HashMap
About this course
This course is designed to teach object-oriented programming concepts, techniques, and applications using the Java programming language. Object-oriented programming emphasis on the fundamentals of the structured design with classes, including development, testing, implementation and documentation also includes object-oriented programming techniques, classes and objects. Java is a simple, portable, distributive, robust, secure, dynamic, architecture neutral, object oriented programming language. Java programming language is designed to enable the development of a small, reliable, portable, distributed, real-time operating platform, high-performance applications for the widest range of computing platforms possible as well as cross-platform interaction. By making applications available across heterogeneous environments, businesses can provide more services, boost end-user productivity, communication and collaboration to enterprise and consumer applications. The Java programming language originated as part of a research project to develop advanced software for a wide variety of network devices and embedded systems. The Java programming language is used as the teaching vehicle for this course. The aim of this course is that student should learn platform independent object oriented programming and java as base language for advanced technology like three tier architecture applications, cloud computing and web development. Java is also used to program electronic hardware devices such as air conditioners, televisions, refrigerators, washing machines and many others.