157:用 Read4 读取 N 个字符

This commit is contained in:
轩辕龙儿 2022-03-19 21:25:01 +08:00
parent fa5083de29
commit 364ce9a235
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,12 @@
package com.code.leet.entiy;
/**
* @description:
* @author: Administrator
* @date: 2022/3/19 21:23
*/
public class Reader4 {
protected int read4(char[] buf4) {
return Math.min(buf4.length, 4);
}
}

View File

@ -83,6 +83,8 @@
package leetcode.editor.cn;
import com.code.leet.entiy.Reader4;
//157: Read4 读取 N 个字符
public class ReadNCharactersGivenRead4 {
public static void main(String[] args) {