摘要:
1. <% 代码 %>:执行Java语句(无返回值,用于逻辑处理,如循环、判断) 示例:循环输出列表数据 jsp <% List fruits = new ArrayList<>(); fruits.add("苹果"); fruits.add("香蕉"); for (String f : fruit 阅读全文
摘要:
import java.util.*; // 1. 边类:存储目标顶点和权重 class Edge { int targetVertex; // 目标顶点的索引 int weight; // 边的权重(无权图可设为1) public Edge(int targetVertex, int weight 阅读全文