style: resolve some FCBL_FIELD_COULD_BE_LOCAL warnings (#5764)

style: make simple fields local
This commit is contained in:
Piotr Idzik
2024-10-13 17:16:10 +02:00
committed by GitHub
parent 9b52ac9633
commit ebc3cd2233
5 changed files with 6 additions and 16 deletions

View File

@@ -6,7 +6,6 @@ import java.util.Scanner;
class Cycle {
private final int nodes;
private final int edges;
private int[][] adjacencyMatrix;
private boolean[] visited;
ArrayList<ArrayList<Integer>> cycles = new ArrayList<ArrayList<Integer>>();
@@ -16,7 +15,7 @@ class Cycle {
System.out.print("Enter the no. of nodes: ");
nodes = in.nextInt();
System.out.print("Enter the no. of Edges: ");
edges = in.nextInt();
final int edges = in.nextInt();
adjacencyMatrix = new int[nodes][nodes];
visited = new boolean[nodes];