Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- import java.io.*;
- public class Bob {
- public static void main(String[] args) {}
- public int RangeBetweenZeroes(ArrayList<int> Breloom)
- throws FileNotFoundException {
- Scanner list = new Scanner(new File("C:\\Users\\WillieShi\\IdeaProjects\\JavaClassFunTime\\src\\com\\suarezJava\\pookachu"));
- while (list.hasNextInt()) {
- int snowrunt = list.nextInt();
- Breloom.add(snowrunt);
- }
- int closest0 = -1;
- int farthest0 = -1;
- for (int i == 0; i <breloom.size (); i++)
- {
- int temp = get(i);
- if (temp == 0 && i > closet0) {
- closet0 = i;
- }
- if (temp == 0 && i < closet0) {
- farthest0 = i;
- }
- }
- int range = farthest0 - closest0 + 1;
- if (closet0 == -1 && farthest0 == -1) {
- return 0;
- }
- if (closet0 < -1 && farthest0 == -1) {
- return 1;
- }
- return range;
- }
- }
- public void removeInRange(ArrayList<String> snowrunt,String beg, String end)
- {
- Char begchar = beg.charAt(0);
- Char endchar = end.charAt(0);
- Scanner list = new Scanner(new File("C:\\Users\\WillieShi\\IdeaProjects\\JavaClassFunTime\\src\\com\\suarezJava\\pookachu"));
- while(list.hasNextString)
- {
- int frostlass = list.nextString;
- snowrunt.add(frostlass);
- }
- char[] torchick = {a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z};
- Int begcharfinal = 0;
- Int endcharfinal = 0;
- Int tempFinal = 0;
- for(int i = 0; i < torchik.length; i++)
- {
- if(begchar == torchick(i))
- {
- begcharfinal = i
- }
- if(endchar = torchick(i))
- {
- endcharfinal = i;
- }
- }
- for(int x = 0; x < snowrunt.size(); x++)
- {
- char temp = snowrunt(i).charAt(0);
- for(int z = 0; i < torchik.length; z++)
- {
- if(temp == torchik(i))
- {
- tempFinal = i;
- }
- }
- if (begcharfinal < tempFinal && endcharfinal > tempFinal )
- {
- snowrunt.remove(i);
- }
- }
Add Comment
Please, Sign In to add comment