Thursday , February 23 2017
Home / JAVA (page 5)

JAVA

Java program to print first 20 fibonacci numbers

Program for fibonacci series

Fibonacci Numbers are the numbers in series which follow the concept that every next number is the sum of previous two numbers. But then which were the first two numbers. They are initially taken 0,1 . Series: 0,1,1,2,3,5,8,13,21,34,55,89….. Also See: c program to print first 20 fibonacci numbers

Read More »

Java program to change lower case to upper case and vice versa

This is a program to alter the case of all characters in a string given as a input. So small letter becomes capital and vice-versa, no change to other symbols or numbers is made. Thus upper case changes to lower case and lower to upper. Example:- HellO WoRlD OUTPUT:- hELLo wOrLd [crayon-58ae0a2f787a4264138656/]  

Read More »

What is Java and why is java needed?

The question what is Java is now almost an absurd one because it has emerged as the top 10 computer discoveries in the year 1995 and ever since. Java is an object oriented programming language that was developed by James Gosling at SUN Microsystems. The writing of this language started in June, 1991 by Mike Sheridan, Patrick Naughton and James ...

Read More »

Character array c / character array java

Character array in c and character array in java can be implemented in two ways:   1. Character array using pointers:  Using pointer you can assign a string value to a character array however it will still work as an character array not as a string. The pointer will point to the first index of your assigned string. char *arr=”hello”;      or char ...

Read More »

How to Null a string or empty a string array

Null a String/ Empty a string array Null a string in C using pointer string or array string. Many times the string is nullified assigning arr[0]=’\0′ but this will not nullify the array as only the first index will be NULL.   1. Null a string using pointer string. [crayon-58ae0a2f795ee093711462/]   TO show that array/pointer is not actually empty or ...

Read More »

program in Java/ Bluej to display the present date and the date after N days

Q. Write a program to input the number of days, year and integer N and display the present date and date after N Days. [crayon-58ae0a2f799a7838400784/]

Read More »

Java program for producing prime numbers for given range

Program to print all prime numbers between 100 to 10000 or whatever given range.   [crayon-58ae0a2f79cf5967130646/] OUTPUT: Tags: bluej program to find the prime numbers between 100 to 1000, prime numbers for a given range.

Read More »

Program to find difference between two dates java

Java program to find out the number of days elapsed between two dates. Java program to find out the difference between two dates given as DD-MM-YY. [crayon-58ae0a2f7a032835211643/]   OUTPUT: Tags: program to find out the difference between two dates in java / bluej / c.

Read More »

Java program for string in circular fashion.

Write a program to input any string and output it in the following format:  hello elloh llohe lohel ohell   [crayon-58ae0a2f7a60f004532873/] OUTPUT:   hello elloh llohe lohel ohell Tags: java program for circular string, bluej program for circulating the string in each line, program for string in round robin fashion.  

Read More »

java program for pattern#6

Java program for printing the following pattern: [crayon-58ae0a2f7a94c461267843/] This program also have indentation. Indentation required depends on the output needed and here indentation requires is: for row 1:  total 4 spaces and then 1 start row 2: total 3 spaces and 3 stars row 3: total 5 spaces and 5 stars……. So on  So here spacing is decreasing by 1. ...

Read More »