Control statements in java : It is a statement that determines whether the other statements will be executed or not. It controls the flow of a program. control statements help with the control flow of the program. Control flow is the order in which the statements execute. Control Statements can be divided into three categories, namely A] Selection statement B] Iteration statement C] Jump statement Let us discuss above statements one by one as follow: A ] Decision-Making /Conditional /Selection statements: Statements that determine which statement to execute and when are known as decision-making statements. The flow of the execution of the program is controlled by the control flow statement. Selection statements allow your program to choose different paths of execution based upon the outcome of an expression or the state of a variable. Java supports two selection statements: I ] if statement: II ] switch statement: I] If statement: It contains 4 types: 1.simple if
Java Applet : Applet is a special type of program that is embedded in the webpage to generate the dynamic content. It runs inside the browser and works at client side. Applets are basically small java programs which can be transported from one computer from another computer in the network. Life cycle of Java Applet : Or Explain the life cycle of an applet with example? Or Describe different stage of life cycle of an applet? Applet is initialized. (Initial state) Applet is started.(running state) Applet is painted.(Display state) Applet is stopped.(idle or stoped state) Applet is destroyed.(dead state) When an applet is executed within the web browser or in an applet window, it goes through the four stages of its life cycle: initialized, started, stopped and destroyed.These stages correspond to the applet methods init(), start(), stop() and destroy() respectively. -->All above mention methods are defined in java.applet.Applet class except paint() method. -->p
JDBC Java Database Connectivity (JDBC) API is a Java API that can access any kind of tabular data, especially data stored in a Relational Database. JDBC works with Java on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX. JDBC Driver JDBC Driver is a software component that enables java application to interact with the database. There are 4 types of JDBC drivers: 1. JDBC-ODBC bridge driver-Type 1 2. Native-API driver (partially java driver)-Type 2 3. Network Protocol driver (fully java driver)-Type 3 4. Thin driver (fully java driver)-Type 4 JDBC classes are enclosed in java.sql package. This package contains following set of classes and interfaces. Classes/interface Description java.sql.BLOB Provide support for BLOB(Binary Large Object) SQL type. java.sql.Connection creates a
Comments
Post a Comment