Home
(current)
About
Tutorial
Technologies
C#
Deep Learning
Statistics for AIML
Natural Language Processing
Machine Learning
SQL -Structured Query Language
Python
Ethical Hacking
Placement Preparation
Quantitative Aptitude
View All Tutorial
Quiz
C#
SQL -Structured Query Language
Quantitative Aptitude
Java
View All Quiz Course
Q & A
C#
Quantitative Aptitude
Java
View All Q & A course
Programs
Articles
Identity And Access Management
Artificial Intelligence & Machine Learning Project
How to publish your local website on github pages with a custom domain name?
How to download and install Xampp on Window Operating System ?
How To Download And Install MySql Workbench
How to install Pycharm ?
How to install Python ?
How to download and install Visual Studio IDE taking an example of C# (C Sharp)
View All Post
Tools
Program Compiler
Sql Compiler
Replace Multiple Text
Meta Data From Multiple Url
Contact
User
Login
Register
FRESHER BELL ALL LANGUAGE ONLINE COMPILER
Alternate Method 2 :Write a program to find anagram or two words of same letter
Languages
Java
C
C-99
C++
C++ 14
C++ 17
PHP
Perl
Python 2
Python 3
Ruby
Go Lang
Scala
Bash Shell
SQL
Pascal
C#
VB.NET
Haskell
Objective C
Swift
Groovy
Fortran
Brainf**k
Lua
TCL
Hack
Rust
D
Ada
R Language
Free Basic
Theme
github
xcode
ambiance
monokai
chaos
chrome
Program
import java.util.*; public class arraysquare { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int f1=0,f2=0; String s1=sc.nextLine(); char c1[]=s1.toCharArray(); String s2=sc.nextLine(); char c2[]=s2.toCharArray(); for(int i=0;i<c1.length;i++) { f1=0; for(int j=0;j<c2.length;j++) { if(c1[i]==c2[j]) { f1=1; break; } } if(f1==0) { break; } } for(int i=0;i<c2.length;i++) { f2=0; for(int j=0;j<c1.length;j++) { if(c2[i]==c1[j]) { f2=1; break; } } if(f2==0) { break; } } if(f1==1 && f2==1) { System.out.println("Same Char"); } else{ System.out.println("Different char"); } } }
Run
Clear
Input
cat act
Output
Powered By Fresher Bell™
Similar Program
#
Program
Language
1
Java program to find quotient and remainder on division by taking input from user
Java
2
Java program to concatenate / join two array
Java
3
Java Logical And Operator Example
Java
4
Java program to convert hexadecimal to decimal
Java
5
Java Left Shift Operator Program
Java
6
Java program to convert Character Array to String
Java
7
Java program to check whether the user input is alphabet or not
Java
8
Java If Else Condition Example
Java
9
Java Do While Loop Example 2
Java
10
Java program to convert octal to decimal
Java
11
Java program to check whether the user input is armstrong number or not
Java
12
Java Right Shift Operator Example
Java
13
Java program to check whether user input is palindrome or not
Java
14
Java program to add element to ArrayListv and get size of it
Java
15
Java Object And Class Example
Java
16
write a java program to count of uppercase and count of lowercase & output will be in the form of (up-lc)
Java
17
Java program to show factor of a user input
Java
18
Java Multiple Object Example
Java
19
Java Continue Keyword Example
Java
20
Java program to generate left angled triangle or left half pyramid using number and for loop
Java
#
Program
Language
Copyright © 2020
Inovatik
- All rights reserved