Author name: SKB

Java Multi Thread Example

Java Program to show Multi Threading class Ta extends Thread { public void run() { for(int i=1; i<=5; i++) { System.out.println(“A thread=” + i); } System.out.println(“Ta is over”); } } class Tb extends Thread { public void run() { for(int j=1; j<=5; j++) { System.out.println(“B thread=” + j); } System.out.println(“Tb is over”); } } class […]

Share

Java Multi Thread Example Read More »

Java Inheritance and packages

Java Program to display Student Marks information using Single Inheritance. import java.io.*; class Student { int rollno; String nm; } class Marks extends Student { int p, c, m, tot; Marks() { try { DataInputStream in=new DataInputStream(System.in); System.out.print(“Enter Roll No:”); rollno=Integer.parseInt(in.readLine()); System.out.print(“Enter Name:”); nm=in.readLine(); System.out.print(“Enter Phy Marks:”); p=Integer.parseInt(in.readLine()); System.out.print(“Enter Che Marks:”); c=Integer.parseInt(in.readLine()); System.out.print(“Enter Maths Marks:”);

Share

Java Inheritance and packages Read More »

Java Programs

List of Java Programs Java program – Type casting [converting from float to an integer] class Typecast { public static void main(String args[]) { float a=2.3333f; int b=10; int c=(int)a+b; System.out.println(c); } } Java Program – use of all data types. class vari { public static void main(String args[]) { int a=3; String str=”Hello World!”;

Share

Java Programs Read More »

Java

An object-oriented, a cross platform programming language. It is used to create stand-alone applications, net based programs and programs for consumer devices. Example : cellular phones, palm pilots Features of Java:- Simple – The Java designers removed a number of complex features that existed in C, such as pointer manipulation, operator overloading etc. Object-Oriented – Everything is

Share

Java Read More »

PHP Database connection

Database connections using PHP and MS Access 1. Display list of records from MS Access  database to PHP web page. (for this example you need to create a DSN from control panel, to create DSN click here) <html> <body> <h1> Connecting to Ms Access using PHP </h1> <hr> <?php $conn=odbc_connect(‘acc_php’,”,”); if (!$conn) { exit(“Connection Failed: “

Share

PHP Database connection Read More »

PHP-Login page and sessions

PHP Session Variables 1. Login page program using PHP and MySQL DB  a) first create a html page as following. <html> <body > <form method=”post” action=”userLogin.php” > <table border=”1″ > <tr> <td> <B>User-Id</B> </td> <td><input type=”text” name=”userid”> </tr> <tr> <td><B>Password</B></td> <td><input name=”password” type=”password”></input></td> </tr> <tr> <td><input type=”submit” value=”Submit”> <td><input type=”reset” value=”Reset”> </tr> </table> </form> </body>

Share

PHP-Login page and sessions Read More »

PHP-Form validation

In this tutorials, you will be able to understand how form validation are done using php syntax. Step1 : Create a file called “Validation.php” and copy the following code and paste into it. <!DOCTYPE HTML> <html> <head> <style> .error {color: #FF00FF;} </style> </head> <body> <?php $nameErr = $emailErr = $genderErr = $websiteErr = “”; $name

Share

PHP-Form validation Read More »

PHP-Examples

Here are some basic programs using PHP 1. Arithmetic operation program using PHP <?php $str=” Arithmetic operation”; $a=4; $b=5; $c=$a+$b; echo “Sum=”, $c; $c=$a-$b; echo “<br>Sub=”, $c; $c=$a*$b; echo “<br>Mul=”, $c; $c=$a/$b; echo “<br>Div=”, $c; ?> 2. PHP program to print person name and age. <?php $name=”John”; $age=20; echo “Person name=”, $name; echo “<br>Age=”, $age;

Share

PHP-Examples Read More »

PHP

PHP = Pre-processor Hypertext PHP, a server side scripting languages widely (nearly 82% of the worlds websites are developed using PHP!) used in developing dynamic and interactive webpages. Advantages of PHP ——Dynamic content. —Computational capability. —Database and file system access. —Network access (from the server only). —Built-in libraries and functions. —Known platform for execution (as opposed

Share

PHP Read More »

Share
Scroll to Top