Posts

Showing posts with the label kotlin

Kotlin: Print Odd & Even Numbers from Array, List & Set

Example 1: Kotlin program to print odd numbers from a List import java.util.stream. Collectors /*Kotlin Program to find Odd Numbers from a list*/ object DriverClass { @JvmStatic fun main (args: Array < String >) { val numbers = listOf ( 1 , 4 , 8 , 40 , 11 , 22 , 33 , 99 ) val oddNumbers = numbers .stream(). filter { o: Int -> o % 2 != 0 } . collect( Collectors .toList()) println ( oddNumbers ) } } Example 2: Kotlin program to print even numbers from a List import java.util.stream. Collectors /*Kotlin Program to find Even Numbers from a list*/ object DriverClass { @JvmStatic fun main (args: Array < String >) { val numbers = listOf ( 1 , 4 , 8 , 40 , 11 , 22 , 33 , 99 ) val evenNumbers = numbers .stream(). filter { o: Int -> o % 2 == 0 } . collect( Collectors .toList()) println ( evenNumbers ) } } Example 3: Kotlin program to print eve

Kotlin Spring Boot Full Stack Mini Projects With Source Code - Free Download

Image
1. Kotlin + Spring Boot + Angular + MongoDB: User Management System Free Download User Interface: Complete Source Code Free  -   Click here Local Setup: Step 1 : Download or clone the source code to a local machine. Spring Boot - Backend Project Setup Step 2 :  mvn clean install Step 3 : Run the Spring Boot application mvn spring-boot:run Angular 10 - Frontend Project Setup Step 4:  The npm install installs all modules that are listed on package.json file and their dependencies npm install Step 5:  Run the Frontend application ng serve Complete Source Code Free  -  Click here 2. Kotlin + Spring Boot + Vue + MongoDB: User Management System Free Download User Interface: Complete Source Code Free  -   Click here Local Setup: Step 1 : Download or clone the source code to a local machine. Spring Boot - Backend Project Setup Step 2 :  mvn clean install Step 3 : Run the Spring Boot application mvn spring-boot:run Vue JS - Frontend Project Setup Step 4:  The npm install installs all modules th

Vaadin + Kotlin CRUD example

Image
Hello everyone, today we will learn how to develop a full-stack web application that is a basic  User Management Application  using Kotlin, Vaadin, Spring, and JPA. Vaadin is the only framework that allows you to write UI 100% in Java without getting bogged down in JS, HTML, and CSS. If you prefer, you can also create layouts in HTML or with a visual designer. Vaadin apps run on the server and handle all communication automatically and securely. GitHub repository link is provided at the end of this tutorial. You can download the source code. Following technologies stack being used: Spring Boot 2.5.5 Kotlin Vaadin 14.7.0 Maven 3 npm package manager H2DB After completing this tutorial what we will build? We will build a full-stack web application that is a basic User Management Application with CRUD features:     • Create User     • List User     • Update User     • Delete User     • View User Following is the User Interface of our application - Let's begin building the application,

Kotlin + Spring Boot + Mustache + JPA - CRUD example

Image
Hello everyone, Today we will learn how to develop a Spring Boot CRUD web application, using Kotlin, Spring Boot, Mustache template, H2DB, and JPA. Following technologies stack being used: Spring Boot 2.5.5 Spring MVC 5.3.10 Gradle Kotlin Mustache 1.15 H2DB  Bootstrap Project Structure: Project Dependency(build.gradle.kts) import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { id( "org.springframework.boot" ) version "2.5.5" id( "io.spring.dependency-management" ) version "1.0.11.RELEASE" kotlin( "jvm" ) version "1.5.31" kotlin( "plugin.spring" ) version "1.5.31" kotlin( "plugin.jpa" ) version "1.5.31" } group = "com.knf.dev.demo" version = "0.0.1-SNAPSHOT" java.sourceCompatibility = JavaVersion.VERSION_11 repositories { mavenCentral() } dependencies { implementation( "org.springframework.boot:spring-boot-starter-data-jpa" )