Recursion

A recursive function solves a particular problem by calling a copy of itself and solving smaller sub problems of the original problems. Many more recursive calls … 1): Terminates when the base case becomes tr… 3): Every recursive call needs extra space in the … 2): Used with functions 4): Smaller code size Rules of Recursion:-Continue reading “Recursion”

Artificial

What is Artificial Intelligence? Artificial intelligence (AI) is a wide-ranging branch of computer science concerned with building smart machines capable of performing tasks that typically require human intelligence. AI Approaches and Concepts Less than a decade after breaking the Nazi encryption machine Enigma and helping the Allied Forces win World War II, mathematician Alan Turing changedContinue reading “Artificial”

Pattern Program

Pattern programs are nothing but patterns consisting of numbers, alphabets or symbols in a particular form. These kinds of pattern programs can be solved easily using for loop condition. Program 1:- Output Screenshot:- Program 2:- Output Screenshot:- Program 3:- Output Screenshot:- Program 4:- Output Screenshot:- Program 5:- Output Screenshot:-

Assignment – 6

GOAL: Understanding Multilevel Inheritance, Abstraction Create an abstract class called HeadOffice. Have below normal methods in it. 2.1. public void check_accounts(int amount) – Have a print statement inside here 2.2. public int pay_tax(int amount) – return this.amount from here Have an abstract method as below. 3.1. public abstract void receive_Customers() Create another abstract class calledContinue reading “Assignment – 6”

Simple Java program

class First{public static void main(String[] args){System.out.println(“Hello java”);}} Class name – First (First letter must be a Capital) public static void main(String[] args) – Main method of a program System.out.println(“Hello java”); – Output Statement Output:- Hello java Java Program to Add two Numbers public class AddTwoNumbers { public static void main(String[] args) { int num1 =Continue reading “Simple Java program”

Create your own website, free on WordPress.com.Create your own website.
Start free