Posts

Showing posts with the label Java

Java Networking Home

Image
   Java Networking Home       In this chapter, you will learn how to connect multiple devices to share resources and communication.  Java networking API allows programmers to develop scalable and robust applications. java.net package includes a set of classes and interfaces and other packages. You will learn how to use them to connect devices and share information from remote systems.     Java Tutorial Home     Java Network Programming Introduction Java Network Classes Part1   Java Network Classes Part2 Java Network Datagrams           TOP      

Lambda expression in Java

Image
Learn Java Lambda expression     Lambda expression introduced in java8. It simplifies functional programming, and makes easier the development. Lambda expression is an anonymous or unnamed function. It is used to implement a method defined by a function interface. What is Functional Interface? If a Java interface contains one and only one abstract method, then it is called as functional interface. Difference between normal function and lambda. It is simple and readable.   Normal function looks as shown below void greet (){      System. out . println ( "Hello" ); } Using lambda expression, it can be written as: () → System.out.println("Hello");     // it is an anonymous function.   Defining the Lambda expression. The arrow operator  (->) used is known as an arrow operator or a lambda operator.  1. When there is a single parameter and single line, It can be written as shown   Syn:    parameterlist -> ex...

Java Question and Answers

Image
 JAVA PRACTICE QUESTIONS  Java Tutorial Home   Java Practice Question on Core to Advanced Java. Try to find the solutions for the questions given below. If you need answers, please comment below. Classes, Objects & Methods 1. What is Constructor Overloading and Method Overloading. Write a java program using them. 2. Write a java program that implements Inner class and show its Access protection. 3.  Accept two command line arguments and calculate sum of those using Java Program. Arrays & Strings 4. Java Program to Add Two Matrix Using Multi-Dimensional Integers Array.  5. A program for String handling, Accept a String value as a command line argument and convert it into uppercase 6. Write a Program in Java to concatenate two Strings values without using Library Functions. 7. Write a Java program to implement a parent class Shape and its subclasses Square, Rectangle, and Triangle. Calculate the area of each shape using abstract classes and methods. Java ...

Servlets JDBC using MySQL

Image
JAVA CRUD WEB APPLICATION USING SERVLETS & MYSQL       Every web application needs some backend to manage data. In java Sevlets allows you to connect with sevaral databases one of them is MySQL which is opensource and versatile. In this tutorial we are going to learn how to connect with MySQL database using Servlets. We are using eclipse IDE to create a Java Web Application. and also you are going to learn how to include bootstrap in servlets while showing the dynamic content on a webpage.  So First  Create a Dynamic Web Application in Eclipse. And create the files given below. MOVETOP↑   In user package User.java UserDao.java In default package  Addservlet.java ViewServlet.java EditServlet.java EditServlet2.java DeleteServlet.java In webapp folder index.html   Queries:   -- -- Database: `usersdb` --   CREATE TABLE IF NOT EXISTS `users` ( `id` int ( 10 ) NOT NULL AUTO_INCREMENT, `username` varchar ( 25 ) NOT NULL , ...

JSP Tutorials Home

Image
 JSP Tutorials Home 🏠   JSP in Java. JSP stands for Java Server Pages. Using JSP, we can build websites using Java. To learn JSP, one should know basic and advanced Java. This tutorial will gives you an overview of JSP technologies and how to create a website using JSP. To get start career in java or go do project in your academics, you should know JSPs.  If you are a java beginner to Java? Visit the link and get start with Basic Java. JSP Introduction Implicity Objects in JSP Actions in JSP Directives in JSP JSTL Introduction JSTL Core Tags  JSTL XML Tags JSTL SQL Tags Top ↑

Java Servlets Home

Image
 Java Servlets Tutorials Home   Servlets in Java. Servlets server-side pages resides in the server, and serves to end user with some response as per the request. Using Servlets, we can build websites in Java. To learn Servlets, one should know basic and advanced Java. This tutorial will gives you an overview of Servlet technologies and how to create a website using Servlets. To get start career in java or to do project in your academics, you should know Servlets.  If you are a java beginner to Java? Visit the java Core Java tutorial and get start with Basic Java.   Java Servlets Introduction Sending Parameters to Servlet in Java Httpservlet Methods in Java Sendredirect in Servlets Servlet Cookies Sessions in Servlets ServletConfig in Java ServletContext in Java Using SendRedirect() in Java Servlets Servlet and Html  in Java Servlets JDBC using MySQL         Top ↑