This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Scanner; | |
public class Split { | |
public static void main(String[] args) { | |
List<String>pieces=new ArrayList<String>(); | |
Scanner sc=new Scanner(System.in); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> | |
<style> | |
div.chart{ | |
font-family:sans-serif; | |
font-size:0.7em; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class TwoDArrayInput{ | |
public static void main(String args[]){ | |
System.out.print("Enter 2D array size : "); | |
Scanner sc=new Scanner(System.in); | |
int rows=sc.nextInt(); | |
int columns=sc.nextInt(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class OneDArrayInput{ | |
public static void main(String args[]){ | |
System.out.print("Enter number of inputs : "); | |
Scanner sc=new Scanner(System.in); | |
int size=sc.nextInt(); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Fibonacci{ | |
public static void main(String args[]){ | |
int n1=0; | |
int n2=1; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
import java.util.InputMismatchException; | |
public class PrimeCheck1{ | |
public static void main(String args[]){ | |
System.out.print("Enter a number : "); | |
Scanner sc=new Scanner(System.in); | |
long number=-999; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PalindromeStringCheck{ | |
public static void main(String ... args){ | |
System.out.print("Enter a String : "); | |
String input=System.console().readLine(); | |
String copyOfInput=input; | |
int i=0; | |
int j=input.length()-1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
import java.util.InputMismatchException; | |
public class Armstrong{ | |
public static void main(String args[]){ | |
Scanner sc=new Scanner(System.in); | |
System.out.print("Enter a number : "); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SumOfDigits{ | |
public static void main(String args[]){ | |
System.out.print("Enter a number : "); | |
long number=-9999,input=-9999; | |
try{ | |
number=Long.parseLong(System.console().readLine()); |