Approximate the integral [0 10] using Simpson’s Rule N = 10 Solution: Solution: 333,33 Download source code: Integral

## Taylor series exponential

Represent an exponential function as Taylor series. Iterate the function 10 times. Hint: Find the approximated Solution of x = 0.5 Solution: 1.6487213

## Decimal To Binary Converter

Write a program which converts a decimal to binary number. A binary number has only 2 values 1 and 0. Method 1: Output: 10000 Method2: In this method, we use a static method toBinaryString(value) from Integer Class int value= 16; // we want to represent 16 as a binary decimal System.out.println(Integer.toBinaryString(value)); Output: 10000

## Loops

WHILE-LOOP “While loops” are used for repeating executions over specific count. The counter is only an aborting execution value. In general, a loop does not need a counter but in the practice, it’s not useful because of the amount of complexity O(n) and the application will run slow or will not work(high CPU utilization). There…

## Logical Operators

Following operators are used in java : operator usage description &&(AND) A && B Return true value when A,B are true ||(OR) A || B Return true , if one of variable is true ! (NOT) !A Return true if the value is false >(greater than) A > B Returns true, if value A is…

## if else statement

IF-ELSE-STATEMENT is a decision maker and executes an instruction having a true or false statement. The main Syntax is: IF (CONDITION) STATEMENT [ELSE STATEMENT2] // optional option is in square brackets Example in REAL: Example in REAL: public static void Main(String[] args){ int age = 18; if(age>=18){ System.out.println(“Right You are allowed to drink alcohol”); }…

## First Java Program

First Programm Hello World: Step 1: Download eclipse from https://www.eclipse.org/downloads/packages/ You need only 1 Version of eclipse JAVA or C++. Step 2: Download new java JDK https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Remember your installation Path of JDK Step 3: SET Environment Variables click on Start -> Control Panel/Properties -> System – > Advanced System Settings > Environment Variables >…