一、卖票案例 //测试 public class CilentTest { public static void main(String arg[]){ Customer p1=new Children(); System.out.println(p1.calculate(100.00)); Cus ...
分类:
其他好文 时间:
2021-05-24 14:17:47
阅读次数:
0
public class WeatherUtil { private static final Logger LOGGER = LoggerFactory.getLogger(WeatherUtil.class); public static String doGet(String path){ S ...
分类:
其他好文 时间:
2021-05-24 14:15:35
阅读次数:
0
题目 给定一个序列,给出最大子序列的和。 解答 public class maxSubSum { public static int maxSubSum1(int [] a){ int maxSum = 0; for (int i = 0; i < a.length; i++) { for(int ...
分类:
编程语言 时间:
2021-05-24 14:09:52
阅读次数:
0
servlet中get和post请求的分发处理 package LWB; import javax.servlet.*; import javax.servlet.http.HttpServletRequest; import java.io.IOException; public class He ...
分类:
其他好文 时间:
2021-05-24 14:07:53
阅读次数:
0
Hello,world Java代码: public class Hello{ public static void main(String[] args){ System.out.print("Hello,world!"); }} 编译: javac Hello.java //编译生成class文 ...
分类:
其他好文 时间:
2021-05-24 14:06:34
阅读次数:
0
简介 使用了C++自带的实现deque 和 unordered_map code class LRUCache { public: unordered_map<int, bool> map; unordered_map<int, int> mapV; deque<int> q; int capaci ...
分类:
其他好文 时间:
2021-05-24 13:58:51
阅读次数:
0
<?php class One{ private static $_one; private function __construct(){} private function __clone(){} public static function getOne(){ if(!self::$_one ...
分类:
Web程序 时间:
2021-05-24 13:36:59
阅读次数:
0
countDownLatch这个类使一个线程等待其他线程各自执行完毕后再执行。 public class CountDownLatchDemo { public static void main(String[] args) throws InterruptedException{ /** * * ...
分类:
其他好文 时间:
2021-05-24 13:31:31
阅读次数:
0
简介 使用队列实现队列哈哈. code class MyQueue { public: queue<int> q; public: /** Initialize your data structure here. */ MyQueue() { } /** Push element x to the ...
分类:
其他好文 时间:
2021-05-24 13:17:52
阅读次数:
0
第一题 5759. 找出所有子集的异或总和再求和 题目链接:5759. 找出所有子集的异或总和再求和 直接爆搜,计算所有可能的子集的异或和curSum,加入到答案ans里 class Solution { private: int ans; int n; public: void dfs(vecto ...
分类:
其他好文 时间:
2021-05-24 13:12:47
阅读次数:
0