The document contains 21 code snippets showing examples of various Java programming concepts. The code snippets cover topics such as classes and objects, inheritance, interfaces, exceptions, threads, applets, packages, input/output, and networking.
Learn about the basic fundamentals of java and important for the different company's interview. Topics like JRE, JDK, Java Keywords, Primitive DataTypes, Types of Variables, Logical, Shift and Bitwise Operator working, Command Line Argument, Handling Arrays, Array Copy, and different programs and output based programs.
This presentation is Unary operator overloading(prefix).
Here ,I try to describe how to Unary operator overloaded and its types with example. may be you can happily read this.
Java Multi Threading Concept
By N.V.Raja Sekhar Reddy
www.technolamp.co.in
Want more...
Like us @ https://www.facebook.com/Technolamp.co.in
subscribe videos @ http://www.youtube.com/user/nvrajasekhar
**** Java Certification Training: https://www.edureka.co/java-j2ee-soa-training ****
This Edureka tutorial on “Arrays in Java” will talk about one of the pillars of Java fundamentals i.e Arrays. It will also take you through the various types of arrays in Java and how they are used to achieve various functionalities. Through this tutorial, you will learn the following topics:
1. Arrays in Java
2. Types of Arrays
3. Working with Arrays
4. Sorting in Arrays
5. Searching in Arrays
Check out our Java Tutorial blog series: https://goo.gl/osrGrS
Check out our complete Youtube playlist here: https://goo.gl/gMFLx3
Follow us to never miss an update in the future.
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
Learn about the basic fundamentals of java and important for the different company's interview. Topics like JRE, JDK, Java Keywords, Primitive DataTypes, Types of Variables, Logical, Shift and Bitwise Operator working, Command Line Argument, Handling Arrays, Array Copy, and different programs and output based programs.
This presentation is Unary operator overloading(prefix).
Here ,I try to describe how to Unary operator overloaded and its types with example. may be you can happily read this.
Java Multi Threading Concept
By N.V.Raja Sekhar Reddy
www.technolamp.co.in
Want more...
Like us @ https://www.facebook.com/Technolamp.co.in
subscribe videos @ http://www.youtube.com/user/nvrajasekhar
**** Java Certification Training: https://www.edureka.co/java-j2ee-soa-training ****
This Edureka tutorial on “Arrays in Java” will talk about one of the pillars of Java fundamentals i.e Arrays. It will also take you through the various types of arrays in Java and how they are used to achieve various functionalities. Through this tutorial, you will learn the following topics:
1. Arrays in Java
2. Types of Arrays
3. Working with Arrays
4. Sorting in Arrays
5. Searching in Arrays
Check out our Java Tutorial blog series: https://goo.gl/osrGrS
Check out our complete Youtube playlist here: https://goo.gl/gMFLx3
Follow us to never miss an update in the future.
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
TOPS Technologies Leading IT Training Institute offer training in Php, .Net, Java, iPhone, Android, Software testing and SEO. By TOPS Technologies. http://www.tops-int.com
Basic java important interview questions and answers to secure a jobGaruda Trainings
P2Cinfotech is one of the leading, Online IT Training facilities and Job Consultant, spread all over the world. We have successfully conducted online classes on various Software Technologies that are currently in Demand. To name a few, we provide quality online training for QA, QTP, Manual Testing, HP LoadRunner, BA, Java Technologies, SEO, Web Technologies, .NET, Oracle DBA etc.
These questions are prepared by Classical Programming Experts and are asked during job interviews.The Solution to the given programs are prepared by Programming Experts and are often asked in job interviews. Knowing solution to these problems will help you clear your concepts.
There is a Bank Account class having methods of deposit and withdrawal which is being accessed by the
tester class. Amount deposited or withdrawn is shown through balance remaining.
20 most important java programming interview questionsGradeup
These questions are prepared by Java Programming Experts and solutions to these programs are asked during job interviews. Knowing solution to these questions helps you in getting a job.
program list:
WAP program to show constructor overloading using static member.
WAP to implement multilevel inheritance and method overriding.
WAP to implement interface class and show use of package.
WAP to implement multilevel exception handling and create your own exception.
WAP to implement 3 threads such that 1st sleeps for 200ms, 2nd for 400ms and 3rd for 600ms.
WAP to create applet of moving banner.
WAP to make a simple calculator.
Build a client server chat application.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Generating a custom Ruby SDK for your web service or Rails API using Smithyg2nightmarescribd
Have you ever wanted a Ruby client API to communicate with your web service? Smithy is a protocol-agnostic language for defining services and SDKs. Smithy Ruby is an implementation of Smithy that generates a Ruby SDK using a Smithy model. In this talk, we will explore Smithy and Smithy Ruby to learn how to generate custom feature-rich SDKs that can communicate with any web service, such as a Rails JSON API.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
Connector Corner: Automate dynamic content and events by pushing a button
Java practical
1. 1. Program to generate Fibonacci series
import java.io.*;
import java.util.*;
public class Fibonacci
{
public static void main(String[] args)
{
DataInputStream reader = new DataInputStream((System.in));
int f1=0,f2=0,f3=1;
try
{
System.out.print("Enter value of n: ");
String st = reader.readLine();
int num = Integer.parseInt(st);
for(int i=1;i<=num;i++)
{
System.out.println("tt"+f3+"tnt");
f1=f2;
f2=f3;
f3=f1+f2;
}
}
catch(Exception e)
{
System.out.println("wrong input");
}
}
}
2. Program to take two numbers as input from command line interface and display their sum
2. Coding:
class Sum
{
public void add(int a,int b)
{
int c;
c=a+b;
System.out.print("tttnnThe sum of two no is = "+c);
System.out.println("nnn");
}
}
class SMain
{
public static void main(String arg[])
{
Sum obj1=new Sum();
int x,y;
String s1,s2;
s1=arg[0];
s2=arg[1];
x=Integer.parseInt(s1);
y=Integer.parseInt(s2);
obj1.add(x,y);
}
}
3. Use of array in java
Coding:
class Person
{
String name[];
int age[];
}
3. class PersonMain
{
public static void main(String arg[])
{
Person obj=new Person();
obj.name=new String[6];
obj.age=new int[6];
obj.name[0]="Neha";
obj.age[0]=19;
obj.name[1]="manpreet";
obj.age[1]=19;
obj.name[2]="rahul";
obj.age[2]=23;
obj.name[3]="yuvraj";
obj.age[3]=12;
obj.name[4]="kombe";
obj.age[4]=19;
obj.name[5]="tony";
obj.age[5]=19;
4. for(int i=0;i<4;i++)
System.out.println(obj.name[i]);
{
for(int j=0;j<4;j++)
System.out.println(obj.age[j]);
}
}
}
4. Create a class customer having three attributes name, bill and id. Include appropriate
methods for taking input from customer and displaying its values
Coding: import java.io.DataInputStream;
class Customer
{
public static void main(String arf[])
{
DataInputStream myinput=new DataInputStream(System.in);
String name;
int bill=0,id=0;
try
{
System.out.println("enter name of customer");
name=myinput.readLine();
System.out.println("enter bill");
bill=Integer.parseInt(myinput.readLine());
System.out.println("enter id");
id=Integer.parseInt(myinput.readLine());
5. System.out.println("name of customer is"+name);
System.out.println("bill of customer"+bill);
System.out.println("id of customer"+id);
}
catch(Exception e)
{
System.out.println("wrong input error!!!");
}
}
}
5. To show the concept of method overloading
Coding:
class Addition//FUNCTION OVERLOADING
{
public int add(int a,int b)
{
int c=a+b;
return (c);
}
public float add(float a,float b)
{
float c=a+b;
return (c);
6. }
public double add(double a,double b)
{
double c=a+b;
return (c);
}
}
class AddMain
{
public static void main(String arg[])
{
Addition obj=new Addition();
System.out.println(obj.add(20,30));
System.out.println(obj.add(100.44f,20.54f));
System.out.println(obj.add(1380.544,473.56784));
}
}
6. To count no. of object created of a class
class Demo//OBJECT CREATION
{
private static int count=0;
public Demo()
7. {
System.out.println("i am from demo");
count++;
System.out.println("object created is"+count);
}
}
class DemoMains
{
public static void main(String args[])
{
Demo obj1=new Demo();
Demo obj2=new Demo();
Demo obj3=new Demo();
}
}
7. To show concept of multilevel inheritance
Coding:
class A
{
private int num1,num2,sum;
public void set(int x,int y)
{
8. num1=x;
num2=y;
sum=num1+num2;
}
public int get1()
{
return(sum);
}
}
class B extends A
{
public void display()
{
System.out.println("sum of two numbers is"+get1());
}
}
class C extends B
{
private double sqr;
public void sqrs()
{
sqr=java.lang.Math.sqrt(get1());
System.out.println("square root of sum is"+sqr);
}
}
class ABCMain
{
public static void main(String args[])
{
C obj1=new C();
obj1.set(100,200);
System.out.println("first number is 100");
System.out.println("second number is 200");
obj1.display();
obj1.sqrs();
}
}
9. 8. To show concept of method overriding
Coding:
class Demo
{
private static int count=0;
public Demo()
{
System.out.println("i am from demo");
count++;
System.out.println("object created is"+count);
}
public String toString()
{
return("method overridding");
}
}
class MethodOverride
{
public static void main(String args[])
{
Demo obj1=new Demo();
Demo obj2=new Demo();
Demo obj3=new Demo();
10. System.out.println("overriding toString methodnnttoverriden message=: "+obj1.toString());
}
}
9. Create a class that will at least import two packages and use the method defined in the
classes of those packages.
Coding:
MyApplet.java:
import java.awt.*;
import java.applet.*;
public class MyApplet extends Applet
{
public void paint(Graphics g)
{
g.drawLine(400,100,100,400);
}
}
Ex1.html:
<applet code="MyApplet.class"
height="600"
width="800"
>
</applet>
11. 10. To create thread by extending thread class
Coding:
class T1 extends Thread
{
public void run()
{
for(int i=0;i<5;i++)
{
System.out.println("thread 1 created");
}
}
}
class T2 extends Thread
{
public void run()
{
for(int i=0;i<5;i++)
{
System.out.println("thread 2 created");
}
}
}
class TMain
{
public static void main(String arg[])
{
T1 obj1=new T1();
obj1.start();
T2 obj2=new T2();
obj2.start();
}
}
12. 11. Create thread by implementing runnable interface
Coding:
class T1 implements Runnable
{
public void run()
{
for(int i=0;i<5;i++)
{
System.out.println("thread 1 created");
}
}
}
class T2 implements Runnable
{
public void run()
{
for(int i=0;i<5;i++)
{
System.out.println("thread 2 created");
}
}
}
class RMain
{
public static void main(String arg[])
{
T1 obj1=new T1();
Thread t1=new Thread(obj1);
T2 obj2=new T2();
Thread t2=new Thread(obj2);
t1.start();
t2.start();
13. }
}
12. To create user defined exception
class InvalidRollno extends Exception
{
String msg;
public InvalidRollno()
{
}
public InvalidRollno(String m)
{
msg=m;
}
public String toString()
{
return(msg);
}
}
14. class Student
{
private int rollno;
public void setStudent(int r) throws InvalidRollno
{
rollno=r;
if(r<1)
{
throw new InvalidRollno("invalid rollno");
}
}
}
class SMain
{
public static void main(String agf[])
{
Student obj1=new Student();
try
{
obj1.setStudent(-11);
}
catch(InvalidRollno e)
{
System.out.println(e);
}
15. }
}
13. Program for showing the concept of sleep method in multithreading.
public class DelayExample{
public static void main(String[] args)
{
System.out.println("Hi");
for (int i = 0; i < 10; i++)
{
System.out.println("Number of itartion = " + i);
System.out.println("Wait:");
try
{
16. Thread.sleep(4000);
}
catch (InterruptedException ie)
{
System.out.println(ie.getMessage());
}}}
14. Program to demonstrate a basic applet.
import java.awt.*;
import java.applet.*;
/*
<applet code="sim" width=300 height=300>
</applet>
*/
public class sim extends Applet
{
String msg=" ";
public void init()
21. import java.awt.FlowLayout;
import java.awt.Graphics;
import java.awt.Container;
import java.awt.event.*;
public class MovingMessage
{
public static void main (String[] s)
{ HelloJava f = new HelloJava();}
}
class HelloJava extends JFrame implements MouseMotionListener, ActionListener
{
int messageX = 25, messageY = 100;
String theMessage;
JButton theButton;
int colorIndex = 0;
static Color[] someColors = { Color.black, Color.red,Color.green, Color.blue, Color.magenta };
HelloJava()
{
theMessage = "Dragging Message";
setSize(300, 200);
Container contentPane = getContentPane();
contentPane.setLayout(new FlowLayout());
theButton = new JButton("Change Color");
contentPane.add(theButton);
theButton.addActionListener(this);
22. addMouseMotionListener(this);
setVisible(true);
}
private void changeColor()
{
if (++colorIndex == someColors.length)
colorIndex = 0;
setForeground(currentColor());
repaint();
}
private Color currentColor()
{ return someColors[colorIndex]; }
public void paint(Graphics g)
{
super.paint(g);
g.drawString(theMessage, messageX, messageY);
}
public void mouseDragged(MouseEvent e)
{
messageX = e.getX();
messageY = e.getY();
repaint();
}
public void mouseMoved(MouseEvent e) { }
public void actionPerformed(ActionEvent e)
23. {
if (e.getSource() == theButton)
changeColor();
}
}
18. Program of an applet which uses the various methods defined in the key listener
interface.
import java.awt.*;
import java.awt.event.*;
public class KeyListenerTester extends Frame implements KeyListener{
TextField t1;
Label l1;
public KeyListenerTester(String s ) {
super(s);
Panel p =new Panel();
l1 = new Label ("Key Listener!" ) ;
p.add(l1);
add(p);
addKeyListener ( this ) ;
24. setSize ( 200,100 );
setVisible(true);
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e){
System.exit(0);
}
});
}
public void keyTyped ( KeyEvent e ){
l1.setText("Key Typed");
}
public void keyPressed ( KeyEvent e){
l1.setText ( "Key Pressed" ) ;
}
public void keyReleased ( KeyEvent e ){
l1.setText( "Key Released" ) ;
}
public static void main (String[]args ){
new KeyListenerTester ( "Key Listener Tester" ) ;
}
}
25. 19. program to change the background colour of applet by clicking on command button.
import java.applet.Applet;
import java.awt.Button;
import java.awt.Color;
public class ChangeButtonBackgroundExample extends Applet{
public void init()
{
Button button1 = new Button("Button 1");
Button button2 = new Button("Button 2");
button1.setBackground(Color.red);
button2.setBackground(Color.green);
add(button1);
add(button2);
}
}
26. 20. Program of an applet that will demonstrate a basic calculator.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
class Calculator extends JFrame {
private final Font BIGGER_FONT = new Font("monspaced",
Font.PLAIN, 20);
private JTextField textfield;
private boolean number = true;
private String equalOp = "=";
private CalculatorOp op = new CalculatorOp();
public Calculator() {
textfield = new JTextField("0", 12);
textfield.setHorizontalAlignment(JTextField.RIGHT);
27. textfield.setFont(BIGGER_FONT);
ActionListener numberListener = new NumberListener();
String buttonOrder = "1234567890 ";
JPanel buttonPanel = new JPanel();
buttonPanel.setLayout(new GridLayout(4, 4, 4, 4));
for (int i = 0; i < buttonOrder.length(); i++) {
String key = buttonOrder.substring(i, i+1);
if (key.equals(" ")) {
buttonPanel.add(new JLabel(""));
} else {
JButton button = new JButton(key);
button.addActionListener(numberListener);
button.setFont(BIGGER_FONT);
buttonPanel.add(button);
}
}
ActionListener operatorListener = new OperatorListener();
JPanel panel = new JPanel();
panel.setLayout(new GridLayout(4, 4, 4, 4));
String[] opOrder = {"+", "-", "*", "/","=","C"};
for (int i = 0; i < opOrder.length; i++) {
JButton button = new JButton(opOrder[i]);
button.addActionListener(operatorListener);
button.setFont(BIGGER_FONT);
panel.add(button);
28. }
JPanel pan = new JPanel();
pan.setLayout(new BorderLayout(4, 4));
pan.add(textfield, BorderLayout.NORTH );
pan.add(buttonPanel , BorderLayout.CENTER);
pan.add(panel , BorderLayout.EAST );
this.setContentPane(pan);
this.pack();
this.setTitle("Calculator");
this.setResizable(false);
}
private void action() {
number = true;
textfield.setText("0");
equalOp = "=";
op.setTotal("0");
}
class OperatorListener implements ActionListener {
public void actionPerformed(ActionEvent e) {
if (number) {
action();
textfield.setText("0");
} else {
number = true;
String displayText = textfield.getText();
29. if (equalOp.equals("=")) {
op.setTotal(displayText);
} else if (equalOp.equals("+")) {
op.add(displayText);
} else if (equalOp.equals("-")) {
op.subtract(displayText);
} else if (equalOp.equals("*")) {
op.multiply(displayText);
} else if (equalOp.equals("/")) {
op.divide(displayText);
}
textfield.setText("" + op.getTotalString());
equalOp = e.getActionCommand();
}
}
}
class NumberListener implements ActionListener {
public void actionPerformed(ActionEvent event) {
String digit = event.getActionCommand();
if (number) {
textfield.setText(digit);
number = false;
} else {
textfield.setText(textfield.getText() + digit);
}
30. }
}
public class CalculatorOp {
private int total;
public CalculatorOp() {
total = 0;
}
public String getTotalString() {
return ""+total;
}
public void setTotal(String n) {
total = convertToNumber(n);
}
public void add(String n) {
total += convertToNumber(n);
}
public void subtract(String n) {
total -= convertToNumber(n);
}
public void multiply(String n) {
total *= convertToNumber(n);
}
public void divide(String n) {
total /= convertToNumber(n);
}
31. private int convertToNumber(String n) {
return Integer.parseInt(n);
}
}
}
21. Program for showing the use of various method of URL class.
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
public class GetURL {
static protected void getURL(String u) {
URL url;
InputStream is;
InputStreamReader isr;
BufferedReader r;
32. String str;
try {
System.out.println("Reading URL: " + u);
url = new URL(u);
is = url.openStream();
isr = new InputStreamReader(is);
r = new BufferedReader(isr);
do {
str = r.readLine();
if (str != null)
System.out.println(str);
} while (str != null);
} catch (MalformedURLException e) {
System.out.println("Must enter a valid URL");
} catch (IOException e) {
System.out.println("Can not connect");
}
}
static public void main(String args[]) {
if (args.length < 1)
System.out.println("Usage: GetURL ");
else
getURL(args[0]);
}
}
33. 22. Program to print concentric circles
import java.awt.*;
import java.applet.*;
import java.util.*;
public class c_cir extends Applet
{
public void paint(Graphics g)
{
Random rg = new Random();
for (int i=1; i<=3; i++)
{
int r = rg.nextInt(255);
int gr = rg.nextInt(255);
int b = rg.nextInt(255);
Color c = new Color(r,gr,b);
g.setColor(c);
35. Vector a1 = new Vector();
int l = a.length;
int i;
for(i=0;i<l;i++)
{
a1.addElement(a[i]);
}
a1.insertElementAt("Vatan",2);
int s = a1.size();
String r[] = new String[s];
a1.copyInto(r);
System.out.println("n Different Font Styles:n");
for(i=0;i<s;i++)
{
System.out.println(r[i]);
}
}
}
24. Program for showing the use ‘for’ in each statement.
package loops;
public class Forloops
{
public static void main(string[] args) {
int loopval;
36. int end_value=11;
for (loopval=0; loopval<end_value;loopval++) {
system.out.printin("loop value="+ loopval);
}
}
}
25. Program for showing a use of jdp programming in java.
import java.lang.*;
import java.sql.*;
class bca
{
public static void main(String arg[]) throws Exception
{
String stdrollno,stdname,stdclass;
Connection conn;