File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <classpath >
3+ <classpathentry kind =" src" path =" src" />
4+ <classpathentry kind =" con" path =" org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7" />
5+ <classpathentry kind =" output" path =" bin" />
6+ </classpath >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <projectDescription >
3+ <name >UnionFindAlgo</name >
4+ <comment ></comment >
5+ <projects >
6+ </projects >
7+ <buildSpec >
8+ <buildCommand >
9+ <name >org.eclipse.jdt.core.javabuilder</name >
10+ <arguments >
11+ </arguments >
12+ </buildCommand >
13+ </buildSpec >
14+ <natures >
15+ <nature >org.eclipse.jdt.core.javanature</nature >
16+ </natures >
17+ </projectDescription >
Original file line number Diff line number Diff line change 1+ eclipse.preferences.version =1
2+ org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode =enabled
3+ org.eclipse.jdt.core.compiler.codegen.targetPlatform =1.7
4+ org.eclipse.jdt.core.compiler.codegen.unusedLocal =preserve
5+ org.eclipse.jdt.core.compiler.compliance =1.7
6+ org.eclipse.jdt.core.compiler.debug.lineNumber =generate
7+ org.eclipse.jdt.core.compiler.debug.localVariable =generate
8+ org.eclipse.jdt.core.compiler.debug.sourceFile =generate
9+ org.eclipse.jdt.core.compiler.problem.assertIdentifier =error
10+ org.eclipse.jdt.core.compiler.problem.enumIdentifier =error
11+ org.eclipse.jdt.core.compiler.source =1.7
Original file line number Diff line number Diff line change 1+ package eager .QuickFind ;
2+
3+ import java .util .InputMismatchException ;
4+ import java .util .Scanner ;
5+
6+ public class RuntimeArray {
7+
8+ private static int [] inputArray ;
9+
10+ public static int readInput (){
11+ Scanner scan = new Scanner (System .in );
12+ System .out .println ("enter" );
13+ int readIntVal = scan .nextInt ();
14+ scan .close ();
15+ return readIntVal ;
16+
17+ }
18+
19+ private static int [] initializeInput () {
20+ int n = 0 ;
21+ try {
22+ n = readInput ();
23+ } catch ( InputMismatchException e ) {
24+ System .out .println ("invlaid integer" );
25+ }
26+ int [] inputAr = new int [n ];
27+ System .out .println (inputArray .length + ": is the array size" );
28+ return inputAr ;
29+ }
30+ public static void main (String [] args ) {
31+ inputArray = initializeInput ();;
32+ }
33+ }
Original file line number Diff line number Diff line change 1+ package eager .exceptions ;
2+
3+ public class InvalidIntegerException extends Exception {
4+
5+ /**
6+ *
7+ */
8+ private static final long serialVersionUID = 1L ;
9+
10+ }
You can’t perform that action at this time.
0 commit comments