163 subscribers
3.42K photos
24 videos
39 files
371 links
Link: @java_posts

Contact: java.response.email@gmail.com
Download Telegram
Java
code7.png
Circular Linked List
Algorithm
* Define a Node class which represents a node in the list. It has two properties data and next which will point to the next node.
* Define another class for creating the circular linked list and it has two nodes: head and tail. It has two methods: add() and display() .
* add() will add the node to the list:
* It first checks whether the head is null, then it will insert the node as the head.
* Both head and tail will point to the newly added node.
* If the head is not null, the new node will be the new tail, and the new tail will point to the head as it is a circular linked list.

a.display() will show all the nodes present in the list.

* Define a new node 'current' that will point to the head.
* Print current. data till current will points to head
* Current will point to the next node in the list in each iteration.
Java Program to Display Even Numbers From 1 to 100
#Source_code
#102
Convert String to Int Example 2, follows what posted above.
#Source_code
#80
Java Program to determine whether one string is a rotation of another.
#Source_code
#103
Java program to find the duplicate words in a string
#Source_code
#104
Java Convert Octal to Decimal
#Source_code
#105
Print Program in Java (Another way)
You can also use a method where number or string is not predefined. Here, user has to put the number or string as input to check if the number/string is palindrome.

Palindrome number algorithm
* Get the number to check for palindrome
* Hold the number in temporary variable
* Reverse the number
* Compare the temporary number with reversed number
* If both numbers are same, print "palindrome number"
* Else Print "not palindrome"
#Source_code
#13
Media is too big
VIEW IN TELEGRAM
Java class initialization Everything you never wanted to know.
#Video
Java Program to find Sum of Natural Numbers
The natural Numbers are the numbers that include all the positive integers from 1 to infinity. For example, 1, 2, 3, 4, 5... n. When we add these numbers together, we get the sum of natural numbers.
#Source_code
#78
Find the minimum index of a repeating element in an array
#Source_code
#Data_structure
code.png
686.8 KB
Java program to find the maximum and minimum value node from a doubly linked list.
#Source_code
#Doubly_linked_list
#Data_structure
Java Program to determine whether two matrices are equal
#Source_code
#106
Java
Java Program to determine whether two matrices are equal #Source_code #106
Two matrices are said to be equal if and only if they satisfy the following conditions:

* Both the matrices should have the same number of rows and columns.
* Both the matrices should have the same corresponding elements.
Java Convert Object to String
#Source_code
#107
code.png
675.8 KB
Java program to insert a new node at the middle of the Circular Linked List
#Source_code
#107
Java
code.png
Insertion of a new node into the list, above given the source code for particular problem solving in java programming language.
#107
Anagram Program in Java Using sort() and equals() Methods

What is Anagram ?
Two string are called anagrams if they contain same set of characters but in different order For example, "keep-peel", "Dormitory - Dirty Room" are some anagrams.
#Source_code
#108