- Saved searches
- Use saved searches to filter your results more quickly
- Faraz-mobin17/Java_Programs
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.md
- [R18] B-Tech II Year II Semester (2-2) CSE Java Programming Lab Manual JNTU Hyderabad (JNTUH).
- Java Programming Lab Programs
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Collection of Java Programs
Faraz-mobin17/Java_Programs
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
- Java is a popular programming language that is used to develop mobile apps, web apps, desktop apps, games and much more³. It is an object-oriented, class-based, concurrent, secured and general-purpose language⁶. It was developed by James Gosling at Sun Microsystems in 1991⁵.
- Object-oriented programming
- Inheritance and polymorphism
- Interfaces and abstract classes
- Generics and collections
- Exceptions and assertions
- Input/output streams
- Threads and concurrency
To run this project, you need to have Java Development Kit (JDK) installed on your machine. You can download it from here.
You also need to have an Integrated Development Environment (IDE) that supports Java, such as Eclipse, IntelliJ IDEA, or NetBeans. You can download them from their respective websites.
There are many reasons why Java is so popular among developers and programmers. Some of them are:
- Java is platform-independent, which means it can run on any machine that has a Java Runtime Environment (JRE) installed¹².
- Java is object-oriented, which means it simplifies complex problems by using classes and objects that encapsulate data and behavior²³.
- Java has a rich set of APIs that provide thousands of classes and methods for various tasks such as networking, database connectivity, user interface, etc².
- Java has a strong and active community that supports and helps each other through forums, blogs, tutorials, etc⁴⁵.
- Java is secure and robust, which means it has built-in features to prevent malicious attacks and handle errors gracefully²³.
- Java is versatile and powerful, which means it can be used for various types of applications such as web apps, mobile apps, desktop apps, games, big data, IoT, etc³.
There are many books that can help you learn Java, depending on your level of expertise and your learning goals. Some of the best Java books that are recommended by many sources are:
- Effective Java by Joshua Bloch²³: This book offers 78 best practices to follow for writing better and more effective Java code. It covers topics such as concurrency, generics, methods, enums, annotations, etc. It is suitable for intermediate to advanced Java programmers who want to improve their skills and knowledge.
- Head First Java by Kathy Sierra and Bert Bates²⁴: This book is a brain-friendly guide that uses a visual and engaging approach to teach Java concepts. It covers topics such as object-oriented programming, inheritance, polymorphism, interfaces, exceptions, threads, etc. It is suitable for beginners who want to learn Java in a fun and interactive way.
- Learning Java by Marc Loy, Patrick Niemeyer and Daniel Leuck⁵: This book is an introduction to real-world programming with Java. It covers topics such as data structures, algorithms, lambda expressions, streams, modules, networking, database connectivity, etc. It is suitable for beginners who want to learn how to use Java for practical applications.
- Core Java Volume I — Fundamentals by Cay S. Horstmann¹: This book is a comprehensive guide that covers the core features of Java SE (Standard Edition). It covers topics such as language basics, exception handling, interfaces, lambda expressions, collections framework etc. It is suitable for beginners who want to master the fundamentals of Java SE.
These are some of the best Java books that you can read to learn more about this popular programming language. You can also check out other books that suit your preferences and needs. Happy reading! 😊
Which book should I start with
There are many books that can help you learn Java, depending on your level of expertise and your learning goals. Some of the best Java books that are recommended by many sources are:
- Effective Java by Joshua Bloch²³: This book offers 78 best practices to follow for writing better and more effective Java code. It covers topics such as concurrency, generics, methods, enums, annotations, etc. It is suitable for intermediate to advanced Java programmers who want to improve their skills and knowledge.
- Head First Java by Kathy Sierra and Bert Bates²⁴: This book is a brain-friendly guide that uses a visual and engaging approach to teach Java concepts. It covers topics such as object-oriented programming, inheritance, polymorphism, interfaces, exceptions, threads, etc. It is suitable for beginners who want to learn Java in a fun and interactive way.
- Learning Java by Marc Loy, Patrick Niemeyer and Daniel Leuck⁵: This book is an introduction to real-world programming with Java. It covers topics such as data structures, algorithms, lambda expressions, streams, modules, networking, database connectivity, etc. It is suitable for beginners who want to learn how to use Java for practical applications.
- Core Java Volume I — Fundamentals by Cay S. Horstmann¹: This book is a comprehensive guide that covers the core features of Java SE (Standard Edition). It covers topics such as language basics, exception handling, interfaces, lambda expressions, collections framework etc. It is suitable for beginners who want to master the fundamentals of Java SE.
These are some of the best Java books that you can read to learn more about this popular programming language. You can also check out other books that suit your preferences and needs. Happy reading! 😊
How to compile Java Program
[R18] B-Tech II Year II Semester (2-2) CSE Java Programming Lab Manual JNTU Hyderabad (JNTUH).
This tutorial provides Lab Programs on various topics of Java Programming. It includes basic java programs, Exception handling, Multi threading, Double linked list, Sorting algorithms, GUI (AWT & Swing) Programs, Applet programs and etc., .
Java Programming Lab Programs
—>
2) Write a Java program that works as a simple calculator. Use a grid layout to arrange buttons for the digits and for the +, -,*, % operations. Add a text field to display the result. Handle any possible exceptions like divided by zero. View Solution
—>
3) a) Develop an applet in Java that displays a simple message. View Solution
—>
3) b) Develop an applet in Java that receives an integer in one text field, and computes its factorial Value and returns it in another text field, when the button named “Compute” is clicked. View Solution
—>
4) Write a Java program that creates a user interface to perform integer divisions. The user enters two numbers in the text fields, Num1 and Num2. The division of Num1 and Num 2 is displayed in the Result field when the Divide button is clicked. If Num1 or Num2 were not an integer, the program would throw a Number Format Exception. If Num2 were Zero, the program would throw an Arithmetic Exception. Display the exception in a message dialog box. View Solution
—>
5) Write a Java program that implements a multi-thread application that has three threads. First thread generates random integer every 1 second and if the value is even, second thread computes the square of the number and prints. If the value is odd, the third thread will print the value of cube of the number. View Solution
—>
6) Write a Java program for the following: i) Create a doubly linked list of elements. ii) Delete a given element from the above list. iii)Display the contents of the list after deletion. View Solution
—>
7) Write a Java program that simulates a traffic light. The program lets the user selects one of three lights: red, yellow, or green with radio buttons. On selecting a button, an appropriate message with Stop, Ready, or Go should appear above the buttons in the selected color. Initially, there is no message shown View Solution
—>
8) Write a Java program to create an abstract class named Shape that contains two integers and an empty method named print Area (). Provide three classes named Rectangle, Triangle, and Circle such that each one of the classes extends the class Shape. Each one of the classes contains only the method print Area () that prints the area of the given shape. View Solution
—>
9) Suppose that a table named Table.txt is stored in a text file. The first line in the file is the header, and the remaining lines correspond to rows in the table. The elements are separated by commas. Write a java program to display the table using Labels in Grid Layout. View Solution
—>
10) Write a java program that handles all mouse events and shows the event name at the center of the window when a mouse event is fired (Use Adapter classes). View Solution