This document provides an introduction and overview of the Java programming language and environment. It outlines the course content which will cover the history and evolution of Java, the Java programming environment including compilation and interpretation, key features such as platform independence and automatic memory management, and packages and tools. The document also provides examples of Java code for a simple "Hello World" application to demonstrate using the Java Development Kit.
The document provides an overview of key Java concepts:
1. Java is an object-oriented, platform-independent language that is compiled to bytecode and interpreted by the Java Virtual Machine (JVM).
2. The JVM handles security, memory management through garbage collection, and allows multithreaded programming.
3. Developers use the Java Development Kit (JDK) for coding Java applications, which includes the compiler, JVM, and other tools. The Java Runtime Environment (JRE) provides minimum requirements to run Java applications.
1) The document discusses Java concepts across 5 doses: the Java Community Process, Java characteristics, terminology, platforms, and frameworks.
2) It covers key Java characteristics like being cross-platform, using object-oriented programming, having robust and good performance, and automatic memory management.
3) Important Java terminology is defined, like the Java Virtual Machine (JVM), Java Runtime Environment (JRE), and Java Development Kit (JDK).
4) The main Java platforms - Java SE, Java ME, and Java EE - are outlined, describing their uses for general applications, limited devices, and enterprise software respectively.
5) Popular Java frameworks for testing, building, GUIs, IDE
this slide contains about basic introduction of java.it will be helpful for a java beginner. it also useful for java lecture course in your versity.programming with java is very essential for every student.this silde may help you to progress your skill & lernt abc about java.
Once upon a time in the C++ century, the Great King of Sun said people need Duke, The PDA (a medieval version of a tablet). He picked his bravest knights – Naughton, Sheriden and Gosling – and entrusted them a secret mission to travel the universe in search for a perfect language that Duke can use.
After three years of a dangerous journey in a world of bits, bytes and memory leakages, on an Asian isle they found it. Java made of Oak has been discovered.
When they returned the King was not in power anymore. New world was ruled by a mysterious organisation, World Wide Web. Our brave knights honoured it with the glorious Java. And the world became perfect…
Mani and Rafal will take your through an exciting story of great programmers, multi-billion company wars, and - most importantly – language features. The history of Java, from its inception till just about today.
The document discusses the key characteristics of the Java programming language. It notes that Java is simple, object-oriented, distributed, interpreted, robust, secure, architecture-neutral, portable, multithreaded, and dynamic. It provides examples of how Java supports these characteristics through features like bytecode, the Java Virtual Machine, automatic memory management, and an extensive library of classes.
This document provides an introduction to the Java programming language, including its history, key concepts, and characteristics. It describes how Java was created in the early 1990s at Sun Microsystems to enable programming for the internet and be platform independent. The document outlines the core object-oriented programming concepts in Java like encapsulation, inheritance, and polymorphism. It also details Java's main characteristics such as being simple, secure, portable and having good performance. The life cycle of a Java program from writing source code to compilation and execution is summarized. Finally, a simple Java program is shown as an example.
The document provides an overview of key Java concepts:
1. Java is an object-oriented, platform-independent language that is compiled to bytecode and interpreted by the Java Virtual Machine (JVM).
2. The JVM handles security, memory management through garbage collection, and allows multithreaded programming.
3. Developers use the Java Development Kit (JDK) for coding Java applications, which includes the compiler, JVM, and other tools. The Java Runtime Environment (JRE) provides minimum requirements to run Java applications.
1) The document discusses Java concepts across 5 doses: the Java Community Process, Java characteristics, terminology, platforms, and frameworks.
2) It covers key Java characteristics like being cross-platform, using object-oriented programming, having robust and good performance, and automatic memory management.
3) Important Java terminology is defined, like the Java Virtual Machine (JVM), Java Runtime Environment (JRE), and Java Development Kit (JDK).
4) The main Java platforms - Java SE, Java ME, and Java EE - are outlined, describing their uses for general applications, limited devices, and enterprise software respectively.
5) Popular Java frameworks for testing, building, GUIs, IDE
this slide contains about basic introduction of java.it will be helpful for a java beginner. it also useful for java lecture course in your versity.programming with java is very essential for every student.this silde may help you to progress your skill & lernt abc about java.
Once upon a time in the C++ century, the Great King of Sun said people need Duke, The PDA (a medieval version of a tablet). He picked his bravest knights – Naughton, Sheriden and Gosling – and entrusted them a secret mission to travel the universe in search for a perfect language that Duke can use.
After three years of a dangerous journey in a world of bits, bytes and memory leakages, on an Asian isle they found it. Java made of Oak has been discovered.
When they returned the King was not in power anymore. New world was ruled by a mysterious organisation, World Wide Web. Our brave knights honoured it with the glorious Java. And the world became perfect…
Mani and Rafal will take your through an exciting story of great programmers, multi-billion company wars, and - most importantly – language features. The history of Java, from its inception till just about today.
The document discusses the key characteristics of the Java programming language. It notes that Java is simple, object-oriented, distributed, interpreted, robust, secure, architecture-neutral, portable, multithreaded, and dynamic. It provides examples of how Java supports these characteristics through features like bytecode, the Java Virtual Machine, automatic memory management, and an extensive library of classes.
This document provides an introduction to the Java programming language, including its history, key concepts, and characteristics. It describes how Java was created in the early 1990s at Sun Microsystems to enable programming for the internet and be platform independent. The document outlines the core object-oriented programming concepts in Java like encapsulation, inheritance, and polymorphism. It also details Java's main characteristics such as being simple, secure, portable and having good performance. The life cycle of a Java program from writing source code to compilation and execution is summarized. Finally, a simple Java program is shown as an example.
This document summarizes the evolution of the Java programming language and platform. It discusses how Java started as a programming language in the 1990s and has since evolved into a popular platform used across desktop, mobile, and enterprise applications. Key points covered include Java's object-oriented design, how it improved productivity through features like automatic memory management, and how the platform has expanded through the Java Community Process and inclusion of dynamic JVM languages. The document argues that while Java the language may not be the best, the Java platform provides a strong, modular foundation for application development.
Java was developed by James Gosling in 1991 at Sun Microsystems. It was originally called Oak but found its way into web browsers like Netscape in 1995. There have been many versions released since including Java 1.0 in 1995 up to the current Java 8. Java can be used to create a variety of applications from desktop programs, to web applications, to programs for devices like phones and tablets. It is designed to be portable, secure, robust and easy to use.
Java was created by James Gosling and his team at Sun Microsystems in 1991. It was originally designed for television but later shifted focus to use on the Internet when released in 1996. Java applications are compiled to bytecode that can run on any Java Virtual Machine, making code portable across platforms. Key features of Java include its simplicity, object-oriented design, security, and ability to write code once and run it anywhere. It differs from C/C++ in its removal of pointers and inclusion of automatic memory management through garbage collection.
Previously we had begin with Java Tutorial beginners guide featuring – What is Java , features of Java Programming Language , Java editors and different Java editions and Java Application Types . Now on Java tutorial we begin with the section 2 that is about JVM – Java Virtual Machine . And also about the difference between JDK Vs JRE Vs JVM including other aspects of Java Virtual Machine .
https://maccablo.com/java-virtual-machine-jdk-jre-jvm/
The document discusses the history and evolution of Java. It describes how early Java technologies like Java 2 Enterprise Edition (J2EE) and Enterprise JavaBeans (EJB) faced issues with performance, productivity, and declining object-oriented programming. This led developers to create alternative open source solutions like Hibernate for persistence instead of the standards-based Java Data Objects (JDO) and EJB entity beans. Standards did not address prior art and created unnecessary complexity. Over time, Java technologies improved but some fundamental problems from early versions still remain today.
Java Tutorial or Core Java Tutorial or Java Programming Tutorial is a widely used robust technology. Let's start learning Java from basic questions like what is Java tutorial, Core Java, where it is used, what type of applications are created in Java, why use java and Java platforms etc. Our Java tutorial helps you to learn Java with easy and simple examples.
JDK stand for java development kit.
JVM stands for Java Virtual Machine.
JRE is the responsible unit to run the java program.
JIT stands for Just In Time compiler.
This document provides an overview of the Java Virtual Machine (JVM) and how it executes Java code. It describes that the JVM converts Java bytecode into machine language and executes it, allowing Java programs to run on different platforms. It also outlines the key components of the JVM, including the class loader, execution engine, stack, method area, and garbage collected heap.
Java is a high-level programming language originally developed by Sun Microsystems that runs on a variety of platforms including Windows, Mac OS, and various versions of UNIX. Key features of Java include being object-oriented, platform independent through the use of a Java Virtual Machine, robust, interpreted, and capable of multi-threaded programming. The JVM allows Java code to run on any system that supports Java without being recompiled.
The document provides details about a Java training course offered by Srihitha Technologies. The course covers topics such as Core Java, OOPS, Strings, Collections, JDBC, Servlets, JSP, RMI, EJB, JNDI, JMS, and other advanced Java and J2EE concepts. The course will be delivered over 75 hours and includes hands-on experience with tools like Eclipse and Weblogic.
Introduction to Java program. Hello World.java. Java Virtual Machine Architecture and how it is working. JVM class loader, Run time Memory, and Execution Engine.
Srihitha Technologies provides Java Online Training in Ameerpet by real time Experts. For more information about Java online training in Ameerpet call 9885144200 / 9394799566.
The document provides an overview of Java including its history, naming, versions, uses and types of applications. It notes that Java was originally developed by James Gosling at Sun Microsystems in 1991 under the name "Oak" and was later renamed to "Java". The document also lists the major Java versions released and where Java is commonly used today such as in desktop applications, web applications, enterprise applications and mobile applications.
Basic difference between jdk,jre,jvm in advance java coursePreeti Agarwal
ExlTech is a best Java Training Institute in Pune which provides exclusive practical training on live projects with 100% Job guarantee. Java Certification Course comprises of Java basics, Core Java Programming, Advance Java & Soft Skills
The document discusses Java programming. It provides an overview of Java, including that it is a platform-independent, object-oriented language. It also lists some key advantages of Java such as being simple, secure, portable, and able to perform tasks simultaneously through multithreading. The document then gives examples of basic Java programs and components such as main methods, identifiers, variables, and arrays.
The document discusses the history and evolution of the Java programming language. It begins by describing how Java originated as a simpler language than C++ and Smalltalk for small consumer devices. While applets did not succeed as originally envisioned, Java found widespread adoption for server-side development through J2EE. However, J2EE projects often failed due to issues with the required distribution of components, low productivity of Enterprise JavaBeans, and poor performance of persistence mechanisms. Overall, the document examines how Java has adapted over time from its initial goals through the incorporation of new features and paradigms.
Learn what a Java Virtual Machine (JVM) is and what it does for your Java applications in this webinar. Eva Andreasson of Azul Systems provides insights into the inner workings of a Java Virtual Machine and some drill down on what compilers and garbage collectors do, so that you don’t have to worry about it while programming your Java application. In particular, you will learn about common optimizations, well established garbage collection algorithms, and what the current biggest challenge with Java scalability is today.
The document discusses various features and constructs of the Java programming language including:
- Java is an object-oriented, simple, platform-independent, secure, robust, and high-performance language.
- The Java Runtime Environment (JRE) provides the runtime platform and Java Development Kit (JDK) includes development tools.
- Java programs are compiled to bytecode that runs on the Java Virtual Machine (JVM) on any platform.
- Core Java constructs include data types, variables, operators, statements, and classes. Primitive data types include numbers, booleans, characters and strings.
This document provides an overview of variables and their scope in Java. It discusses the three types of variables in Java: local variables, instance variables, and class (static) variables.
Local variables are declared within methods, constructors, or blocks and can only be accessed within their declaration scope. Instance variables are declared within a class but outside of methods and can be accessed using an object reference. Class variables are declared with the static keyword, belong to the class itself rather than any object, and are accessed via the class name. The document provides examples and discusses default variable initialization.
This document provides an overview of the Java programming language and platform. It discusses Java's origins, characteristics, editions, and components like the JDK, JRE, and JVM. Java is introduced as a simple, secure, robust, and platform-independent language well-suited for client-server web applications and small devices. The document outlines Java's history and evolution from 1995 to present. Key aspects of Java like object-orientation, portability, and multi-threading are summarized.
this slide is about java introductory.it will be helpful for you to know abc of jaba.it also be helpful for u in your versity java course.programming with java is very important for every student.java freshers can grabbed it easily
This document summarizes the evolution of the Java programming language and platform. It discusses how Java started as a programming language in the 1990s and has since evolved into a popular platform used across desktop, mobile, and enterprise applications. Key points covered include Java's object-oriented design, how it improved productivity through features like automatic memory management, and how the platform has expanded through the Java Community Process and inclusion of dynamic JVM languages. The document argues that while Java the language may not be the best, the Java platform provides a strong, modular foundation for application development.
Java was developed by James Gosling in 1991 at Sun Microsystems. It was originally called Oak but found its way into web browsers like Netscape in 1995. There have been many versions released since including Java 1.0 in 1995 up to the current Java 8. Java can be used to create a variety of applications from desktop programs, to web applications, to programs for devices like phones and tablets. It is designed to be portable, secure, robust and easy to use.
Java was created by James Gosling and his team at Sun Microsystems in 1991. It was originally designed for television but later shifted focus to use on the Internet when released in 1996. Java applications are compiled to bytecode that can run on any Java Virtual Machine, making code portable across platforms. Key features of Java include its simplicity, object-oriented design, security, and ability to write code once and run it anywhere. It differs from C/C++ in its removal of pointers and inclusion of automatic memory management through garbage collection.
Previously we had begin with Java Tutorial beginners guide featuring – What is Java , features of Java Programming Language , Java editors and different Java editions and Java Application Types . Now on Java tutorial we begin with the section 2 that is about JVM – Java Virtual Machine . And also about the difference between JDK Vs JRE Vs JVM including other aspects of Java Virtual Machine .
https://maccablo.com/java-virtual-machine-jdk-jre-jvm/
The document discusses the history and evolution of Java. It describes how early Java technologies like Java 2 Enterprise Edition (J2EE) and Enterprise JavaBeans (EJB) faced issues with performance, productivity, and declining object-oriented programming. This led developers to create alternative open source solutions like Hibernate for persistence instead of the standards-based Java Data Objects (JDO) and EJB entity beans. Standards did not address prior art and created unnecessary complexity. Over time, Java technologies improved but some fundamental problems from early versions still remain today.
Java Tutorial or Core Java Tutorial or Java Programming Tutorial is a widely used robust technology. Let's start learning Java from basic questions like what is Java tutorial, Core Java, where it is used, what type of applications are created in Java, why use java and Java platforms etc. Our Java tutorial helps you to learn Java with easy and simple examples.
JDK stand for java development kit.
JVM stands for Java Virtual Machine.
JRE is the responsible unit to run the java program.
JIT stands for Just In Time compiler.
This document provides an overview of the Java Virtual Machine (JVM) and how it executes Java code. It describes that the JVM converts Java bytecode into machine language and executes it, allowing Java programs to run on different platforms. It also outlines the key components of the JVM, including the class loader, execution engine, stack, method area, and garbage collected heap.
Java is a high-level programming language originally developed by Sun Microsystems that runs on a variety of platforms including Windows, Mac OS, and various versions of UNIX. Key features of Java include being object-oriented, platform independent through the use of a Java Virtual Machine, robust, interpreted, and capable of multi-threaded programming. The JVM allows Java code to run on any system that supports Java without being recompiled.
The document provides details about a Java training course offered by Srihitha Technologies. The course covers topics such as Core Java, OOPS, Strings, Collections, JDBC, Servlets, JSP, RMI, EJB, JNDI, JMS, and other advanced Java and J2EE concepts. The course will be delivered over 75 hours and includes hands-on experience with tools like Eclipse and Weblogic.
Introduction to Java program. Hello World.java. Java Virtual Machine Architecture and how it is working. JVM class loader, Run time Memory, and Execution Engine.
Srihitha Technologies provides Java Online Training in Ameerpet by real time Experts. For more information about Java online training in Ameerpet call 9885144200 / 9394799566.
The document provides an overview of Java including its history, naming, versions, uses and types of applications. It notes that Java was originally developed by James Gosling at Sun Microsystems in 1991 under the name "Oak" and was later renamed to "Java". The document also lists the major Java versions released and where Java is commonly used today such as in desktop applications, web applications, enterprise applications and mobile applications.
Basic difference between jdk,jre,jvm in advance java coursePreeti Agarwal
ExlTech is a best Java Training Institute in Pune which provides exclusive practical training on live projects with 100% Job guarantee. Java Certification Course comprises of Java basics, Core Java Programming, Advance Java & Soft Skills
The document discusses Java programming. It provides an overview of Java, including that it is a platform-independent, object-oriented language. It also lists some key advantages of Java such as being simple, secure, portable, and able to perform tasks simultaneously through multithreading. The document then gives examples of basic Java programs and components such as main methods, identifiers, variables, and arrays.
The document discusses the history and evolution of the Java programming language. It begins by describing how Java originated as a simpler language than C++ and Smalltalk for small consumer devices. While applets did not succeed as originally envisioned, Java found widespread adoption for server-side development through J2EE. However, J2EE projects often failed due to issues with the required distribution of components, low productivity of Enterprise JavaBeans, and poor performance of persistence mechanisms. Overall, the document examines how Java has adapted over time from its initial goals through the incorporation of new features and paradigms.
Learn what a Java Virtual Machine (JVM) is and what it does for your Java applications in this webinar. Eva Andreasson of Azul Systems provides insights into the inner workings of a Java Virtual Machine and some drill down on what compilers and garbage collectors do, so that you don’t have to worry about it while programming your Java application. In particular, you will learn about common optimizations, well established garbage collection algorithms, and what the current biggest challenge with Java scalability is today.
The document discusses various features and constructs of the Java programming language including:
- Java is an object-oriented, simple, platform-independent, secure, robust, and high-performance language.
- The Java Runtime Environment (JRE) provides the runtime platform and Java Development Kit (JDK) includes development tools.
- Java programs are compiled to bytecode that runs on the Java Virtual Machine (JVM) on any platform.
- Core Java constructs include data types, variables, operators, statements, and classes. Primitive data types include numbers, booleans, characters and strings.
This document provides an overview of variables and their scope in Java. It discusses the three types of variables in Java: local variables, instance variables, and class (static) variables.
Local variables are declared within methods, constructors, or blocks and can only be accessed within their declaration scope. Instance variables are declared within a class but outside of methods and can be accessed using an object reference. Class variables are declared with the static keyword, belong to the class itself rather than any object, and are accessed via the class name. The document provides examples and discusses default variable initialization.
This document provides an overview of the Java programming language and platform. It discusses Java's origins, characteristics, editions, and components like the JDK, JRE, and JVM. Java is introduced as a simple, secure, robust, and platform-independent language well-suited for client-server web applications and small devices. The document outlines Java's history and evolution from 1995 to present. Key aspects of Java like object-orientation, portability, and multi-threading are summarized.
this slide is about java introductory.it will be helpful for you to know abc of jaba.it also be helpful for u in your versity java course.programming with java is very important for every student.java freshers can grabbed it easily
The document provides an introduction and history of Java, outlining how it was developed in the 1990s as a platform-independent language by James Gosling at Sun Microsystems, and discusses some key advantages of Java like being object-oriented, portable, robust, and having built-in support for security and multithreading. It also describes the Java Development Kit (JDK) which contains tools for developing Java programs and the Java Runtime Environment (JRE) which allows running of Java applications and includes the Java Virtual Machine.
This document provides an introduction and overview of key features of the Java programming language. It discusses Java's origins, its object-oriented design, and how it aims to be simple, robust, secure, portable, and high-performance. Key features highlighted include automatic memory management, exception handling, threads and concurrency, generics, and its architecture neutral bytecode format which allows programs to run on any system with a Java Virtual Machine.
The document provides an overview of the Java programming language. It discusses that Java was created by James Gosling at Sun Microsystems in 1995 and the latest version is Java SE 14. It then describes several key concepts and features of Java including: it being object-oriented, simple, secure, platform independent, robust, portable, dynamic, architecture neutral, high performance, multithreaded, and distributed. It also discusses the Java Virtual Machine, Java Runtime Environment, Java Development Kit, and main Java platforms.
1. Java is a popular object-oriented programming language created by James Gosling at Sun Microsystems in 1991.
2. The Java Development Kit (JDK) provides tools for developing Java programs, and includes the Java Runtime Environment (JRE) which allows programs to run on any platform with a Java Virtual Machine (JVM).
3. Key features of Java include being platform independent, secure, robust, and multithreaded. Java code is compiled to bytecode that runs on a JVM, allowing the same code to run on different operating systems.
1. Java is a popular object-oriented programming language created by James Gosling at Sun Microsystems in 1991.
2. The Java Development Kit (JDK) provides tools for developing Java programs, and includes the Java Runtime Environment (JRE) which allows programs to run on various platforms.
3. The JRE contains the Java Virtual Machine (JVM) which interprets Java bytecode to execute programs consistently across different hardware and software environments.
The document provides information about Java, including:
- Java is an object-oriented programming language that is platform independent and can be used to create applications for web, desktops, mobile devices, and more.
- Java was originally developed in the early 1990s by James Gosling at Sun Microsystems for use in set-top boxes, but became popular for building web applications and is now widely used.
- The Java Development Kit (JDK) includes tools like javac, java, javadoc and others needed to develop, compile, run and document Java programs, as well as class libraries and documentation. The JVM executes compiled Java code.
This document provides an introduction and overview of the Java programming language, including its history, features, and components. It discusses how Java was developed in 1995 at Sun Microsystems and introduced as a platform-independent language for general business applications and web-based internet applications. It also summarizes Java's key features like being object-oriented, compiled and interpreted, and portable, as well as its core architecture components like the Java programming language, Java Virtual Machine, and Java API.
Java is an object-oriented programming language developed by Sun Microsystems that is designed to be portable, secure, simple, and reliable. Key features of Java include its use of automatic garbage collection, lack of pointers, rich class libraries, support for object-oriented programming, and ability to run the same code on multiple platforms through the use of a Java Virtual Machine. Java was originally created for consumer electronics but became widely used for internet programming due to its portability.
The document discusses the history and characteristics of the Java programming language, including how Java source code is compiled to bytecode and executed by the Java Virtual Machine. It also covers Java program and package structures, importing classes, documentation comments, and data types and methods in Java.
Java is a programming language created in the early 1990s by James Gosling at Sun Microsystems. It was initially called Oak but later renamed to Java. The Java platform includes a runtime environment called the Java Virtual Machine (JVM) that executes Java bytecode. Java allows programs to run on any device with a JVM, making it platform independent. Key features of Java include being object-oriented, robust, secure, portable, high performance, and multi-threaded. These features along with automatic memory management make Java very useful for developing applications across devices and platforms.
The document provides an overview of the Java programming language, including its history, core concepts, and execution process. Some key points:
- Java was created in 1991 by James Gosling at Sun Microsystems with an initial focus on embedded systems, but later expanded to web applications due to the rise of the Internet.
- The Java platform consists of the Java programming language, Java Virtual Machine (JVM), and Java Application Programming Interfaces (APIs). The JVM allows Java programs to run on any hardware/software platform.
- A Java program is compiled into bytecode that can be executed by any JVM, providing platform independence. The execution involves compiling the source code and then interpreting the bytecode on
- It is easier to design classes for thread safety from the beginning rather than retrofitting them for thread safety later.
- The document discusses features of the Java programming language such as being object-oriented, platform independent, secure, robust, architecture-neutral, portable, high-performance, multi-threaded, and dynamic.
- It also explains key Java concepts like the Java Virtual Machine (JVM), Java Runtime Environment (JRE), and Java Development Kit (JDK).
Similar to Introduction to java by priti sajja (20)
This document discusses artificial intelligence and its applications post-COVID 19. It is presented by Dr. Priti Srinivas Sajja from the department of computer science at Sardar Patel University. The document covers various topics related to AI such as its nature, symbolic AI, bio-inspired computing, applications in areas like healthcare, education, and examples of AI systems.
Priti Srinivas Sajja is a professor of computer science specializing in artificial intelligence. Over her career she has published over 200 papers and books, received several best paper awards, and taken on leadership roles in academic organizations. Her research focuses on knowledge-based systems, soft computing, multiagent systems, and software engineering.
1. The document provides five assignments for an artificial intelligence course involving designing artificial neural networks. The first assignment asks students to design a neural network that takes two input values representing digits and outputs a classification of the number of digits. The second asks students to design a neural network that takes various mobile phone features as input and provides output opportunities. The third asks students to do the same but with job selection features. The fourth and fifth assignments provide sample datasets for students to design neural networks to select courses and car models respectively. Students are instructed to submit their answers in a file or notebook with their details by August 10th, 2019.
This document provides an overview of Management Information Systems (MIS) presented by Priti Srinivas Sajja. It discusses the evolution of MIS, logical foundations, typical MIS examples, the future of MIS, business information systems, and information needs for different business functions like marketing and finance. The document is authored by Priti Srinivas Sajja, a professor from Sardar Patel University, and contains 24 slides on the topic of MIS.
Management Information System MIS Priti Sajja S P University Priti Srinivas Sajja
The document provides information about Management Information Systems (MIS) including:
- MIS is a computer-based system for providing accurate and flexible access to data to support managerial decision making.
- MIS has evolved from basic data processing to today's sophisticated systems that support all levels of management.
- Key differences between computing technology and MIS include MIS's focus on understanding business needs and applying technology, while computing focuses solely on the technological aspects.
- Typical MIS applications support functions like production, finance, personnel, and marketing at strategic, tactical and operational levels.
Programming definitions on fuzzy logic and genetic algorithmsPriti Srinivas Sajja
This document contains 6 problems related to fuzzy logic and genetic algorithms. It provides definitions for problems involving programming fuzzy logic concepts like membership functions and complement membership. It also provides definitions for genetic algorithm problems like single and double variable function optimization, and the traveling salesman problem. Sample functions are given that should be optimized or minimized. The problems range from 5-20 marks and involve writing computer programs to implement the given fuzzy logic or genetic algorithm concepts and problems.
Priti Srinivas Sajja is an Associate Professor working with Post Graduate Department of Computer Science, Sardar Patel University, India since 1994. She specializes in Artificial Intelligence especially in knowledge-based systems, soft computing and multiagent systems. She is co-author of Knowledge-Based Systems (2009) and Intelligent Technologies for Web Applications (2012). She is Principal Investigator of a major research project funded by UGC, India.
She has 113 publications in books, book chapters, journals, and in the proceedings of national and international conferences. Her four publications have won best research paper awards. for more detail, please visir pritisajja.info.
The document discusses the benefits of exercise for mental health. Regular physical activity can help reduce anxiety and depression and improve mood and cognitive function. Exercise causes chemical changes in the brain that may help protect against mental illness and improve symptoms.
This lecture has been taken for teh AICTE sponsored workshop on web mining. It covers infromation retrieval, searching, meta search engine, focused search engine, web mining, agent based web, knowledge management on web, ontology management systems and wisom web.
Priti Srinivas Sajja is an Associate Professor in the Department of Computer Science at Sardar Patel University. The document discusses various topics in artificial intelligence including natural vs artificial intelligence, types of AI tests, applications of AI, knowledge representation in AI systems, bio-inspired computing approaches like artificial neural networks, genetic algorithms, and swarm intelligence. It provides examples of different AI techniques and references for further reading.
Knowledge Based Systems -Artificial Intelligence by Priti Srinivas Sajja S P...Priti Srinivas Sajja
Priti Srinivas Sajja is an Associate Professor working with Post Graduate Department of Computer Science, Sardar Patel University, India since 1994. She specializes in Artificial Intelligence especially in knowledge-based systems, soft computing and multiagent systems. She is co-author of Knowledge-Based Systems (2009) and Intelligent Technologies for Web Applications (2012).
She has 104 publications in books, book chapters, journals, and in the proceedings of national and international conferences. Three of her publications have won best research paper awards. Visit pritisajja.info for material.
The document discusses the role of information and communication technology (ICT) in laboratory management. It describes how the role of lab technicians has evolved over time from manually operating computers to now maintaining the technology infrastructure. Future developments may include more devices, software, and gesture-based or wearable technologies. Lab technicians are responsible for operating equipment, maintaining security and records, assisting users, and addressing technical issues. Their skills include knowledge of computer systems and instruction. The document outlines rules for students in the computer lab and describes potential future technologies.
In the realm of cybersecurity, offensive security practices act as a critical shield. By simulating real-world attacks in a controlled environment, these techniques expose vulnerabilities before malicious actors can exploit them. This proactive approach allows manufacturers to identify and fix weaknesses, significantly enhancing system security.
This presentation delves into the development of a system designed to mimic Galileo's Open Service signal using software-defined radio (SDR) technology. We'll begin with a foundational overview of both Global Navigation Satellite Systems (GNSS) and the intricacies of digital signal processing.
The presentation culminates in a live demonstration. We'll showcase the manipulation of Galileo's Open Service pilot signal, simulating an attack on various software and hardware systems. This practical demonstration serves to highlight the potential consequences of unaddressed vulnerabilities, emphasizing the importance of offensive security practices in safeguarding critical infrastructure.
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfChart Kalyan
A Mix Chart displays historical data of numbers in a graphical or tabular form. The Kalyan Rajdhani Mix Chart specifically shows the results of a sequence of numbers over different periods.
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyScyllaDB
Freshworks creates AI-boosted business software that helps employees work more efficiently and effectively. Managing data across multiple RDBMS and NoSQL databases was already a challenge at their current scale. To prepare for 10X growth, they knew it was time to rethink their database strategy. Learn how they architected a solution that would simplify scaling while keeping costs under control.
Taking AI to the Next Level in Manufacturing.pdfssuserfac0301
Read Taking AI to the Next Level in Manufacturing to gain insights on AI adoption in the manufacturing industry, such as:
1. How quickly AI is being implemented in manufacturing.
2. Which barriers stand in the way of AI adoption.
3. How data quality and governance form the backbone of AI.
4. Organizational processes and structures that may inhibit effective AI adoption.
6. Ideas and approaches to help build your organization's AI strategy.
HCL Notes and Domino License Cost Reduction in the World of DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-and-domino-license-cost-reduction-in-the-world-of-dlau/
The introduction of DLAU and the CCB & CCX licensing model caused quite a stir in the HCL community. As a Notes and Domino customer, you may have faced challenges with unexpected user counts and license costs. You probably have questions on how this new licensing approach works and how to benefit from it. Most importantly, you likely have budget constraints and want to save money where possible. Don’t worry, we can help with all of this!
We’ll show you how to fix common misconfigurations that cause higher-than-expected user counts, and how to identify accounts which you can deactivate to save money. There are also frequent patterns that can cause unnecessary cost, like using a person document instead of a mail-in for shared mailboxes. We’ll provide examples and solutions for those as well. And naturally we’ll explain the new licensing model.
Join HCL Ambassador Marc Thomas in this webinar with a special guest appearance from Franz Walder. It will give you the tools and know-how to stay on top of what is going on with Domino licensing. You will be able lower your cost through an optimized configuration and keep it low going forward.
These topics will be covered
- Reducing license cost by finding and fixing misconfigurations and superfluous accounts
- How do CCB and CCX licenses really work?
- Understanding the DLAU tool and how to best utilize it
- Tips for common problem areas, like team mailboxes, functional/test users, etc
- Practical examples and best practices to implement right away
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Tatiana Kojar
Skybuffer AI, built on the robust SAP Business Technology Platform (SAP BTP), is the latest and most advanced version of our AI development, reaffirming our commitment to delivering top-tier AI solutions. Skybuffer AI harnesses all the innovative capabilities of the SAP BTP in the AI domain, from Conversational AI to cutting-edge Generative AI and Retrieval-Augmented Generation (RAG). It also helps SAP customers safeguard their investments into SAP Conversational AI and ensure a seamless, one-click transition to SAP Business AI.
With Skybuffer AI, various AI models can be integrated into a single communication channel such as Microsoft Teams. This integration empowers business users with insights drawn from SAP backend systems, enterprise documents, and the expansive knowledge of Generative AI. And the best part of it is that it is all managed through our intuitive no-code Action Server interface, requiring no extensive coding knowledge and making the advanced AI accessible to more users.
Monitoring and Managing Anomaly Detection on OpenShift.pdfTosin Akinosho
Monitoring and Managing Anomaly Detection on OpenShift
Overview
Dive into the world of anomaly detection on edge devices with our comprehensive hands-on tutorial. This SlideShare presentation will guide you through the entire process, from data collection and model training to edge deployment and real-time monitoring. Perfect for those looking to implement robust anomaly detection systems on resource-constrained IoT/edge devices.
Key Topics Covered
1. Introduction to Anomaly Detection
- Understand the fundamentals of anomaly detection and its importance in identifying unusual behavior or failures in systems.
2. Understanding Edge (IoT)
- Learn about edge computing and IoT, and how they enable real-time data processing and decision-making at the source.
3. What is ArgoCD?
- Discover ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes, and its role in deploying applications on edge devices.
4. Deployment Using ArgoCD for Edge Devices
- Step-by-step guide on deploying anomaly detection models on edge devices using ArgoCD.
5. Introduction to Apache Kafka and S3
- Explore Apache Kafka for real-time data streaming and Amazon S3 for scalable storage solutions.
6. Viewing Kafka Messages in the Data Lake
- Learn how to view and analyze Kafka messages stored in a data lake for better insights.
7. What is Prometheus?
- Get to know Prometheus, an open-source monitoring and alerting toolkit, and its application in monitoring edge devices.
8. Monitoring Application Metrics with Prometheus
- Detailed instructions on setting up Prometheus to monitor the performance and health of your anomaly detection system.
9. What is Camel K?
- Introduction to Camel K, a lightweight integration framework built on Apache Camel, designed for Kubernetes.
10. Configuring Camel K Integrations for Data Pipelines
- Learn how to configure Camel K for seamless data pipeline integrations in your anomaly detection workflow.
11. What is a Jupyter Notebook?
- Overview of Jupyter Notebooks, an open-source web application for creating and sharing documents with live code, equations, visualizations, and narrative text.
12. Jupyter Notebooks with Code Examples
- Hands-on examples and code snippets in Jupyter Notebooks to help you implement and test anomaly detection models.
Digital Marketing Trends in 2024 | Guide for Staying AheadWask
https://www.wask.co/ebooks/digital-marketing-trends-in-2024
Feeling lost in the digital marketing whirlwind of 2024? Technology is changing, consumer habits are evolving, and staying ahead of the curve feels like a never-ending pursuit. This e-book is your compass. Dive into actionable insights to handle the complexities of modern marketing. From hyper-personalization to the power of user-generated content, learn how to build long-term relationships with your audience and unlock the secrets to success in the ever-shifting digital landscape.
Introduction of Cybersecurity with OSS at Code Europe 2024Hiroshi SHIBATA
I develop the Ruby programming language, RubyGems, and Bundler, which are package managers for Ruby. Today, I will introduce how to enhance the security of your application using open-source software (OSS) examples from Ruby and RubyGems.
The first topic is CVE (Common Vulnerabilities and Exposures). I have published CVEs many times. But what exactly is a CVE? I'll provide a basic understanding of CVEs and explain how to detect and handle vulnerabilities in OSS.
Next, let's discuss package managers. Package managers play a critical role in the OSS ecosystem. I'll explain how to manage library dependencies in your application.
I'll share insights into how the Ruby and RubyGems core team works to keep our ecosystem safe. By the end of this talk, you'll have a better understanding of how to safeguard your code.
Fueling AI with Great Data with Airbyte WebinarZilliz
This talk will focus on how to collect data from a variety of sources, leveraging this data for RAG and other GenAI use cases, and finally charting your course to productionalization.
Your One-Stop Shop for Python Success: Top 10 US Python Development Providersakankshawande
Simplify your search for a reliable Python development partner! This list presents the top 10 trusted US providers offering comprehensive Python development services, ensuring your project's success from conception to completion.
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on integration of Salesforce with Bonterra Impact Management.
Interested in deploying an integration with Salesforce for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
GraphRAG for Life Science to increase LLM accuracyTomaz Bratanic
GraphRAG for life science domain, where you retriever information from biomedical knowledge graphs using LLMs to increase the accuracy and performance of generated answers
GraphRAG for Life Science to increase LLM accuracy
Introduction to java by priti sajja
1. Introduction to Java Programming
Unlocking the World of
Java Programming…..
June, 2011
Priti Srinivas Sajja
Visit pritisajja.info for detail
1 pritisajja.info
2. Unit 1: Course Content
• The Java programming language: history, evolution
• Introduction to the Java programming environment
– source programs organization,
– compilation to byte code,
– loading by the class loader,
– interpretation by the Java Virtual Machine,
– just-in-time compilation using HotSpot technology, tools
2 pritisajja.info
3. Unit 1: Course Content
• Key features of the Java platform:
– platform independence at source and byte code level,
– use of UNICODE character set,
– extensive use of reference types,
– automatic garbage collection, generics,
– assertions, collections and iterating over collections,
– event-driven programming for the GUI,
– security,
– out of box multithreading and networking,
– dynamic loading and linking of classes,
– interfaces, designed with the Internet in mind
• Packages, jar files, CLASSPATH, javadoc
• Different technologies under the Java umbrella
• The Java Development Kit, the Java Runtime Environment and IDEs
3 pritisajja.info
4. Unit 2: Java Programming - I
• Using the command line tools v/s an IDE, features of the IDE
• Syntax of the Java programming language
• An anatomy of a Java program
• Data types: primitive v/s reference types, wrapper classes,
automatic boxing and unboxing
• Interfaces, inheritance and polymorphism
• Exception handling
• Arrays
• Generics, assertions, enumerations
• The Java standard API
• String handling
• Java tools
4 pritisajja.info
5. Reference Book
• Schildt H. : The Complete Reference Java
2, 5th Edition, McGraw-Hill / Osborne,
2002
5 pritisajja.info
6. What is Java?
• Java is object-oriented with built in
Application Programming Interface
(API)
• It has borrowed its syntax from C/C++
• Java does not have pointers directly.
• Applications and applets are available.
6 pritisajja.info
7. Ideal Programming Language for Internet -- the objective was to share data
and documents across WWW invented in 1989.
To share interactive executable programs on WWW -- in 1990 Sun Micro
system has started project called Green using C++ for consumer electronic. The
team developed new programming language called ‘OAK’ .
OAK avoids dangerous things such as -- pointers and operator overloading. Also
they have added architecture neutrality and automatic memory management. The first web
browser called ‘WebRunner’ was developed using OAK. Afterword it is named as HotJava
OAK was renamed as java in 1995 --A common story is that the name Java relates to
the place from where the development team got its coffee.
7 pritisajja.info
8. Platform independence of Java
• Java is both compiled and interpreted.
• Source code is compiled to bytecode.
• The Java Virtual Machine (JVM) loads and
links parts of the code dynamically at run
time.
• Hence it carries substantial run time type
information on objects and supports late
binding.
8 pritisajja.info
9. Platform independence of Java Byte code
• Byte codes are the machine
language of the Java virtual
machine.
Java Byte Code • When a JVM loads a class
instruction … file, it gets one stream of
code … byte codes for each method
compiler in the class.
• The byte codes streams are
stored in the method area
of the JVM.
Host • The byte codes for a
system … method are executed when
that method is invoked
during the course of running
Java virtual Machine
the program.
• it has an instruction • They can be executed by
set interpretation, just-in-time
• it manipulates compiling, or any other
various memory technique that was chosen
areas at run time. by the designer of a
particular JVM.
9 pritisajja.info
10. Features of Java:
Simple • To follow
• Remote applets are not trusted and not allowed to use local
Secure resources
Object-oriented • Supports advantages of OOA
Platform independent • Independent form hardware and software platforms
and Architecture Neural
Interpreted • It is complied also and interpreted also.
• Java is strong, replacing pointer by reference and provides
Robust automatic memory management
Multi threaded • Supports concurrent procedures
Distributed and • Supports dynamic binding and links parts of code at the time
Dynamic of execution.
High performance • Java provides native language support
10 pritisajja.info
11. JDK : Java Development Kit
• The JDK is the Java Development Kit.
• Major versions are 1.1 (Java 1) and 1.2 (Java 2). (Version 1.3
has just been released.)
• This can be downloaded free of cost from http://java.sun.com
• The JDK can be downloaded for different platforms: Windows,
Unix (Solaris), MacOS.
• Comes as a self-extracting exe for Win95+, which extracts to
c:jdk1.2 directory.
• Certain environment variables, such as PATH and CLASSPATH
need to be set/reset.
• Path must be set to include c:jdk1.2bin
11 pritisajja.info
12. Java Utilities
• Javac
– The java compiler, that converts source code into byte
code stored in class files.
• Java
– The java interpreter that executes byte code for a java
application from class files.
12 pritisajja.info
13. Using the JDK: Hello World Application
Step 1: Write java code
/**
The HelloWorld class implements an application that
simply displays “Hello World!” to the standard output
(console)
*/
public class HelloWorld
{
public static void main (String args[])
{
//required prototype for main function
System.out.println(“Hello world!”);
} // end of main
…………………………………………..
}// end of class
………………………………………………...
13 pritisajja.info
14. Using the JDK: Hello World Application
Step 2: Save the source in a file
• The file MUST have the same name as the public class in the
source, and must have a .java extension. That is, the above file
should be saved as
HelloWorld.java
with the case maintained.
• A java source file cannot contain more than one public class
according to the above restriction.
How many main methods can be there in a java program?
14 pritisajja.info
15. Using the JDK: Hello World Application
Step 3: Compile the source file using javac
• Use the following command line at the shell prompt
javac HelloWorld.java
• If the code is correct, compilation will produce the file
HelloWorld.class
• If there are errors, repeat steps 1-3.
what javac does behind the scenes, use the following
command line javac -verbose HelloWorld.java.
15 pritisajja.info
16. Using the JDK: Hello World Application
Step 4: Run the compiled code.
• Invoke the java interpreter by the command line
java HelloWorld
• Output: Hello World!
16 pritisajja.info
17. Naming Conventions
• Java distinguishes between UPPER and lower case variables.
• The convention is to capitalize the first letter of a
class name.
• If the class name consists of several words, they are run together
with successive words capitalized within the name (instead of using
underscores to separate the names).
• The name of the constructor is the same as the
name of the class.
• All keywords (words that are part of the language and cannot
be redefined) are written in lower case.
17 pritisajja.info
18. Prototype of the main method
public static void main (String args[])
For the main method
• public is the access specifier.
• static is the storage class.
• void is the return type.
• String args[ ] is an array of strings
Check public static void main( ) ? Will it cause any
error? If yes, what?
18 pritisajja.info
19. About main method…
• Several main methods can be defined in a java class.
• The interpreter will look for a main method
with the prescribed signature as the entry point.
• A method named main, which has some other signature is of
no particular significance. It is like any other method
• in the class.
• Therefore, if the main method is not declared correctly, the
application will not execute. There may not be any compilation
problem.
• This class will compile correctly, but will not execute. The interpreter
will say
In class NoMain: void main (String argv[]) is not defined
19 pritisajja.info
20. public class TwoMains
{
/** This class has two main methods with * different signatures */
public static void main (String args[])
{
//required prototype for main method
System.out.println(“Hello world!”);
int i;
i = main(2);
System.out.println (“i = ” + i );
}
/**This is the additional main method*/
public static int main(int i)
{ return i*i; }
} // end of class PSS
20 pritisajja.info
21. Is it true?
• The argument to the mandatory main
function
public static void main (String args[])
which is String args []
can also be written as
String [] args
21 pritisajja.info
22. Comments
There are three types of comments defined by Java.
1. Single-line comment :Java single line comment
starts from // and ends till the end of that line.
2. Multiline comment: Java multiline comment is
between /* and */.
3. Documentation comment : Documentation comment
is used to produce an HTML file that documents your
program. The documentation comment begins with a
/** and ends with a */.
22 pritisajja.info
23. Identifiers
• Identifiers are used for class names, method names,
and variable names.
• An identifier may be any sequence of uppercase and
lowercase letters, numbers, or the underscore and
dollar-sign characters.
• Identifiers must not begin with a number.
• Java Identifiers are case-sensitive.
• Some valid identifiers are ATEST, count, i1, $Atest, and
this_is_a_test
• Some invalid identifiers are 2count, h-l, and a/b
23 pritisajja.info
24. Operators
Java operators can be grouped into the following four groups:
• Arithmetic,
• Bitwise,
• Relational,
• Logical.
24 pritisajja.info
26. Bitwise Operators
Operator Result
• ~ Bitwise unary NOT
• & Bitwise AND
• | Bitwise OR
• ^ Bitwise exclusive OR
• >> Shift right
• >>> Shift right zero fill
• << Shift left
• &= Bitwise AND assignment
• |= Bitwise OR assignment
• ^= Bitwise exclusive OR assignment
• >>= Shift right assignment
• >>>= Shift right zero fill assignment
• <<= Shift left assignment
26 pritisajja.info
27. Relational Operators
Operator Result
• == Equal to
• != Not equal to
• > Greater than
• < Less than
• >= Greater than or equal to
• <= Less than or equal to
27 pritisajja.info
28. Boolean Logical Operators
Operator Result
• & Logical AND
• | Logical OR
• ^ Logical XOR (exclusive OR)
• || Short-circuit OR
• && Short-circuit AND
• ! Logical unary NOT
• &= AND assignment
• |= OR assignment
• ^= XOR assignment
• == Equal to
• != Not equal to
• ? : Ternary if-then-else
28 pritisajja.info
29. Boolean Logical Operators
Operator Result
• & Logical AND
• | Logical OR
• ^ Logical XOR (exclusive OR)
• || Short-circuit OR
• && Short-circuit AND
• ! Logical unary NOT
• &= AND assignment
• |= OR assignment
• ^= XOR assignment
• == Equal to
• != Not equal to
• ? : Ternary if-then-else
29 pritisajja.info
30. Data Types
• Three kinds of data types in Java.
– primitive data types
– reference data types
– the special null data type, also the type of
the expression null. (only possible value is
null) We may write if (obj!= null).
30 pritisajja.info
31. Primitive Data Types in Java
type kind memory range
byte integer 1 byte -128 to 127
short integer 2 bytes -32768 to 32767
int integer 4 bytes -2147483648 to 2147483647
-9223372036854775808 to
long integer 8 bytes
-9223372036854775807
±3.40282347 x 1038 to
float floating point 4 bytes
±3.40282347 x 10-45
±1.76769313486231570 x 10308 to
double floating point 8 bytes
±4.94065645841246544 x 10-324
single
char character
2 bytes all Unicode characters
boolean true or false 1 bit
There is no unsigned integer in java.
31 pritisajja.info
32. /** This program demonstrates how Java
* adds two integers. */
public class BigInt
{
public static void main(String args[])
{
int a = 2000000000; //(9 zeros)
int b = 2000000000;
System.out.println ( “This is how Java adds integers”);
System.out.println ( a + “+” + b + “ = ” + (a+b) );
} // end of main
}// end of class
Output:
This is how Java adds integers
2000000000 + 2000000000 = -294967296
32 pritisajja.info
33. public class Significant
{
public static void main (String args[])
{
final float PI = 3.141519265359f;
float radius = 1.0f;
float area;
area = PI * radius * radius;
System.out.println (“The area of the circle = ” +
area);
}// end of main
}// end of class
Output:
area of the circle = 3.1415193
33 pritisajja.info
34. Declaration of variable
• A variable is defined by an identifier, a type, and an
optional initializer.
• The variables also have a scope(visibility / lifetime).
• In Java, all variables must be declared before they can
be used. The basic form of a variable declaration is :
type identifier [ = value][, identifier
[= value] ...] ;
• Java allows variables to be initialized dynamically. For
example: double c = 2 * 2;
34 pritisajja.info
35. Scope and life of a variable:
• Variables declared inside a scope are not
accessible to code outside.
• Scopes can be nested. The outer scope
encloses the inner scope.
• Variables declared in the outer scope are
visible to the inner scope.
• Variables declared in the inner scope are
not visible to the outside scope.
35 pritisajja.info
36. public class Main
{ public static void main(String args[])
{ int x; // known within main
x = 10;
if (x == 10)
{ int y = 20;
System.out.println("x and y: " + x + " " + y);
x = y + 2; }
PSS
System.out.println("x is " + x);
}// end of main
}// end of class
Output:
x and y: 10 20
x is 22
36 pritisajja.info
37. public class Main2
{ public static void main(String args[])
{ if (true)
{ int y = 20;
System.out.println("y: " + y);
} // end of if
y = 100;
}// end of main
}// end of class
PSS
37 pritisajja.info
38. public class Main3
{ public static void main(String args[])
{ int i = 1;
{int i = 2;
}
} PSS
}
38 pritisajja.info
39. Flow Control: if:
• if(condition) statement;
• Note: Write a java program that compares two
variables and print appropriate message.
• The condition can be expression that result in a
value.
• Expression may return boolean value.
• if (b) is equivalent to if (b== true).
39 pritisajja.info
40. Flow Control: if else:
if (condition) statement1;
else statement2;
• Each statement may be a single statement or a
compound statement enclosed in curly braces (a
block).
• The condition is any expression that returns a
boolean value.
• Nested if statements are possible
40 pritisajja.info
41. Flow Control: if else ladder:
PSS
if(condition) statement; Example
else if(condition) statement; public class Main4
else if(condition) statement; { public static void main(String args[])
… { int month = 4;
… String value;
else statement; if (month == 1) value = "A";
else if (month == 2) value = "B";
else if (month == 3) value = "C";
else if (month == 4) value = "D";
else value = "Error";
System.out.println("value = " + value);
}}
41 pritisajja.info
42. Switch statement:
switch (expression)
{ case value1: statement sequence
break;
case value2 : statement sequence
break;
...
case valueN: statement sequence
break;
default: default statement sequence }
. Switch statement can be nested
42 pritisajja.info
43. Command Line arguments
public class LeapYear
{ public static void main(String[] args)
{ int year = Integer.parseInt(args[0]);
boolean Leap;
Leap= (year % 4 == 0);
if ((Leap) && (year!=100))
System.out.println(Leap); PSS
}
43 } pritisajja.info
44. Command Line arguments
public class PowersOfTwo
{ public static void main(String[] args)
{ int N = Integer.parseInt(args[0]);
int i = 0;
int powerOfTwo = 1;
while (i <= N)
{ System.out.println(i + " " + powerOfTwo);
powerOfTwo = 2 * powerOfTwo;
i = i + 1; }
PSS
}
}
44 pritisajja.info
45. Command Line arguments
public class Sqrt
{ public static void main(String[] args)
{ double c = Double.parseDouble(args[0]);
double epsilon = 1e-15;
double t = c; // relative error tolerance
while (Math.abs(t - c/t) > epsilon*t)
{ t = (c/t + t) / 2.0; }
// print out the estimate of the square root of
System.out.println(t);
} PSS
}
45 pritisajja.info
46. Recursion
PSS
class factorial{
int fact(int n){
if (n==1) return 1;
else return (n*fact(n-1));}
}
class factdemo{
public static void main (String args[]){
int a = 4; int fa=0;
factorial f = new factorial ();
fa=f.fact(a);
System.out.println(fa);
}
}
46 pritisajja.info
47. Fibonacci
PSS
class fibonacci {
int fibo(int n){
if (n==1) return 1;
else return ( fibo(n-1) + fibo(n-2) ); }
}
class fibodemo{
public static void main (String args[]){
int a = 3; int fa=0;
fibonacci f = new fibonacci ();
fa=f.fibo(a);
System.out.println(fa);
}
}
47 pritisajja.info
48. Arrays
• General form of one dim array declaration is
type array-name[size];
• Examples are:
• int a[10];
– Defines 10 integers such as a[0], a[1], … a[9]
• char let[26];
– Defines 26 alphabets let[1]=„B‟;
• float x[20];
• Employee e[100]; //Employee is a class definition
• Tree t[15]; // Tree is a class
48 pritisajja.info
49. Array Definition with Initialization
• int maxmarks[6]= {71,56,67,65,43,66}
• char let[5]= {„a‟, „e‟, „I‟, ‟o‟, ‟u‟};
• Initialization of an array can be done using
new statement as follows:
– int a[j]; // defines a as an array contains j integrs
– a=new int [10] // assigns 10 integers to the array a
• This can also be written as
– int [] a = new int [10];
49 pritisajja.info
50. Example of array
PSS
class array{
public static void main (String args[ ]){
int score [] = { 66,76,45,88,55,60};
for (int i=0; i<6; i++)
System.out.println(score[i]);
System.out.println(“==============”);
}
}
50 pritisajja.info
51. Example of array
public class Main4 { PSS
public static void main(String[] args)
{ int[] intArray = new int[] { 1, 2, 3, 4, 5 };
// calculate sum
int sum = 0;
for (int i = 0; i < intArray.length; i++)
{ sum = sum + intArray[i]; }
// calculate average
double average = sum / intArray.length;
System.out.println("average: " + average);
}
}
51 pritisajja.info
52. Example of array
PSS
public class Main6
{ public static void main(String args[])
{ int a1[] = new int[10];
int a2[] = {1, 2, 3, 4, 5};
int a3[] = {4, 3, 2, 1};
System.out.println("length of a1 is " + a1.length);
System.out.println("length of a2 is " + a2.length);
System.out.println("length of a3 is " + a3.length);
}
}
52 pritisajja.info
53. Example of array with functions
PSS
class ArrayPass {
void printing(int s[]){
int i=0;
for (i=0; i<6; i++)
System.out.println(s[i]);
System.out.println("=============");
}
}
class arraydemo{
public static void main (String args[ ]){
ArrayPass student = new ArrayPass();
int score[] = {66,76,45,88,55,60};
student.printing(score);
}
}
53 pritisajja.info
54. import java.util.*;
public class array{
public static void main(String[] args){
int num[] = {50,20,45,82,25,63};
int l = 6; // you may use l= num.length;
int i,j,t;
System.out.print("Given number : ");
for (i = 0;i < l;i++ ) { System.out.print(" " + num[i]); }
System.out.println("n");
System.out.print("Accending order number : ");
Arrays.sort(num);
for(i = 0;i < l;i++){
System.out.print(" " + num[i]);
}
}
}
54 pritisajja.info
55. Two Dimensional Arrays
Declaration of a two dimensional array
called twoD with size 4*5
• int twoD[][] = new int[4][5];
(0,0) (0,3) (0,4)
(1,0) (1,1) (1,4)
(2,0) (2,2) (2,4)
(3,0) (3,3) (3,4)
55 pritisajja.info
56. Matrix
public class Main {
public static void main(String args[]) {
int twoD[][] = new int[4][5];
for (int i = 0; i < 4; i++)
{ for (int j = 0; j < 5; j++)
{ twoD[i][j] = i*j; } }
//--------------------------------------------------------------------------------
for (int i = 0; i < 4; i++)
{ for (int j = 0; j < 5; j++)
{ System.out.print(twoD[i][j] + " "); }
System.out.println(); }
}
}
56 pritisajja.info
58. Three Dimensional Array
public class Main {
public static void main(String args[]) {
int threeD[][][] = new int[3][4][5];
for (int i = 0; i < 3; i++)
for (int j = 0; j < 4; j++)
for (int k = 0; k < 5; k++)
threeD[i][j][k] = i * j * k;
for (int i = 0; i < 3; i++)
{ for (int j = 0; j < 4; j++)
{ for (int k = 0; k < 5; k++)
System.out.print(threeD[i][j][k] + " ");
System.out.println(); }
System.out.println(); }
} }
58 pritisajja.info
59. Jagged array
• When you allocate memory for a multidimensional array, you can
allocate the remaining dimensions separately. For example, the
following code allocates the second dimension manually.
public class Main {
public static void main(String[] argv)
{ int twoD[][] = new int[4][];
twoD[0] = new int[5];
twoD[1] = new int[5];
twoD[2] = new int[5];
twoD[3] = new int[5]; } }
59 pritisajja.info
60. public class Main {
public static void main(String args[]) {
int twoD[][] = new int[4][];
twoD[0] = new int[1];
twoD[1] = new int[2];
twoD[2] = new int[3];
twoD[3] = new int[4];
60 pritisajja.info
61. for (int i = 0; i < 4; i++)
{ for (int j = 0; j < i + 1; j++)
{ twoD[i][j] = i + j; } }
//---------------------------------------------
for (int i = 0; i < 4; i++)
{ for (int j = 0; j < i + 1; j++)
System.out.print(twoD[i][j] + " ");
System.out.println(); }
}
}
61 pritisajja.info
63. Bank constructor
class Bank {
int accno;
String accname;
float accbal;
Bank()
{accno=999;
accname= "XXX";
accbal= 0;}
Bank(int x, String y, float z)
{accno=x;
accname= y;
accbal= z;}
Bank(int x, String y)// default t constructor
{accno=x;
accname= y;
accbal= 1000;}
void printbal()
{ System.out.println (accno);
System.out.println ( accname );
System.out.println (accbal);
}
63}// end of class pritisajja.info
64. Bank constructor
class BankDemo {
public static void main (String args[ ]){
Bank b1= new Bank();
Bank b2 = new Bank(123, "PSS");
Bank b3 = new Bank (124, "XYZ", 5000);
b1.printbal();
b2.printbal();
b3.printbal();
}
}
64 pritisajja.info
65. Bank with methods and array
class Bank { void printbal()
int accno; { System.out.println (accno);
String accname; System.out.println ( accname );
float accbal; System.out.println (accbal);
Bank() System.out.println("----------------------------------");
{accno=999; }
accname= "XXX";
accbal= 0;} void deposit(float Amt)
Bank(int x, String y, float z)
{ System.out.println("Depositing ....."+ Amt);
{accno=x;
accbal=accbal + Amt; }
accname= y;
accbal= z;}
Bank(int x, String y)
{accno=x; void withdraw(float Amt)
accname= y; { System.out.println("Withdrwing ....."+ Amt);
accbal= 1000;} accbal=accbal - Amt; }
}// end of class
65 pritisajja.info
66. Bank Calling Class
class BankDemo3 {
public static void main (String args[ ]){ b[2].withdraw(15000);
b[2].printbal();
Bank [] b = new Bank[3];
}
b[0]= new Bank(); }
b[0].printbal();
b[1]= new Bank(111, "PPP", 5000);
b[1].printbal();
b[2]= new Bank(222,"SSS", 10000);
b[2].printbal();
b[2].deposit (10000);
b[2].printbal();
66 pritisajja.info
67. Home Assignment
• Consider students class as follows:
– Sno integer
– Sname String
– Marks 6 integers
• Write java class having the above Student structure.
Define method for total, average and result printing in
this class. Define a main class, having an array of 3
students. Use the developed utilities for these 3
students.
67 pritisajja.info
68. Strings
• Strings in java are not primitive data types
but members of String class.
• + operator can be used to join two strings.
68 pritisajja.info
70. Strings
• Strings in java are not primitive data types
but members of String class.
• + operator can be used to join two strings.
70 pritisajja.info