Java Networking is a set of classes and APIs provided by the Java platform to facilitate network communication and programming. It allows developers to create networked applications that can communicate over various network protocols, such as TCP/IP and UDP. Let’s explore the network basics and socket overview in the context of Java programming: Network Programming […]
Advanced Java Tutorials
In Java, InetAddress is a class that represents an IP address and provides methods to work with IP addresses and hostnames. It is part of the java.net package and is used in network programming for tasks such as resolving hostnames, retrieving IP addresses, and performing network-related operations. Here’s an overview of InetAddress in Java networking […]
Lets look at the syntax below Syntax ServerSocket ss; ss=new ServerSocket(Port_No);Example ServerSocket ss = new ServerSocket(80); Lets Look at TCP IP Server Program TCP IP Server Program import java.io.*; import java.net.*; public class MyDemoServer { public static void main(String[] args) { try{ ServerSocket ss = new ServerSocket(80); Socket s=ss.accept();//Establishing Connection DataInputStream dis = new DataInputStream(s.getInputStream()); […]
Datagrams:DatagramSocket Class DatagramSocket class represents connectionless socket for sending and receiving datagram packets. A Datagram is basically an information but there is no guarantee of its content ,arrival or arrival time. Constructor Method Description DatagramSocket() It creats a datagram socket and bind its with the available port number on the local host machine DatagramSocket(int port) […]
URL stands for Uniform Resource locator The Java URL class represents an URL This class is pointer to resource on the world wide web Lets check with an example http://166.62.27.173:8090//myurl.html Here http is the URL 166.62.27.173 is the Server name or IP Address 8090 is the Port Number Myurl.html is file name Constructor URL(String url) […]
Lets start with introductory portion. Jdbc Java database connectivity is used to connect Java application with database. jdbc is an API used to communicate Java application two database in database Independent and platform independent manner. it provides classes any two faces to connect or communicate Java application which database. jdbc is the standard method accessing […]
What is an API? Application Program interface A set of routines, protocols and tools for building software applications. JDBC is an API Which is used in java programming for interacting with database. JDBC API Allows java programs to Make a connection with Database Creating SQL statements Execute SQL Statements Process and Send the resulting Records
JDBC Connectivity Model JDBC Architecture Java Application A java programs that runs stand alone in a client or server. JDBC API It Provides classes and interfaces to connect or communicate java application with database. JDBC Driver Manager This class manages lists of database drivers. It ensures that correct driver is used to access each data […]