mathajax

Simple Java Lab programming List and Explanation

The cljavacode (Computer language Java code) has recently started and will regularly post Java programming code on different domain Lab code/Algorithm/Data mining/Optimization/Image processing for engineering students and all curious learner.

List of Java Lab Code

Roots of Quadratic Equation

It explains how compute to root of quadratic equation ax+by+c of given arguments a ,b and c.

Biggest number in array of Integers

The Java code finds a biggest number in array

switch case string

The Java code demonstrates simple calculator using switch case with conditional string constant

switch case integer

The Java code demonstrates switch case integer using object member function access.

switch case char

The Java code demonstrates switch case char for application of splitting vowels and consonants from a argument string.

Temperature conversion

The Java code demonstrates the conversion between Celsius to Fahrenheit and vice versa using temperature conversion formula

char2ascii and math tables

The Java code converts given char sequence (string) into corresponding ASCII value and another Java code generates math multiplication table for given a times table.

Decimal to Binary Conversion

The Java code converts decimal value to binary using Arithmetic Operators division.

Right shift operator

The Java code - how to convert decimal to binary and binary to decimal using bitwise right shift >> Operator.

Left shift operator

The Java code converts decimal to binary and binary to decimal using bitwise left shift << Operator.

Sequence generator

The Java code generates arithmetic and geometric sequence with difference d.

Sum of sequence

The Java code generates arithmetic and geometric sequence with difference d and sum the sequence.

Maximum value and index

The Java code demonstrate how to search maximum value and its index in an array of integers.

Minimum value and index

The Java code demonstrate how to search minimum value and its index in an array of integers.

Euclidean distance

The Java code finds euclidean distance between two vectors (points) X and Y. The vectors can be 2 dimensional or N-dimensional elements.

Manhattan distance

The Java code finds Manhattan distance between two points X and Y. The points can be a scalar or a vector of 2 dimensional or N-dimensional elements.

Chebyshev distance

The Java code finds Chebyshev distance between two points X and Y. The point can be a scalar or a vector of 2 dimensional or N-dimensional elements.

Minkowski distance

The Java code finds Minkowski distance between two points X and Y. The point can be a scalar or a vector of 2 dimensional or N-dimensional elements.

Vector magnitude

The Java code find magnitude of a vector which can be 2-dimensional or N-dimensional elements.

Dot product

The Java code finds dot product between two vectors X and Y. The vectors can be N-dimensional elements.

Cosine similarity

The Java code finds cosine similarity between two vectors X and Y. The vectors can be N-dimensional elements.

File Read

The Java code explains how to read contents from a file using a FileInputStream object in the byte-wise manner.

File Write

The Java code explains how to write contents into a new file using a FileOutputStream object in the byte-wise manner..

Lambda Expression - Aggregation

The Java code explains how to summarize an array of integers using lambda expression to find sum of array, average of array, minimum of array and maximum of array.

Lambda Expression - Filtering

The Java code explains how use relational operation like >,< in lambda expression to search an array of integers.

Vector - inner product

The Java program find inner product of two vector X and Y using a matrix product of these vectors that results a scalar output.

Vector normalization - Unit vector

The Java program converts a vector into unit vector using vector norm or length.

Two vectors Orthogonal

The Java program finds whether Two vectors X and Y are orthogonal or not.

vectors Orthonormal

The Java program finds the vectors X and Y are orthonormal or not by verifying their orthogonality and magnitude=1 (unit vector).

Comments

Popular posts from this blog

Solving System of Linear Equations by Gauss Jordan Elimination

Matrix Forward and Back Substitution

Solve System of Linear Equations by LU Decompose

Matrix Determinant by Upper Triangular Matrix

Chebyshev distance between two points