가장 많이 묻는 면접 질문과 답변 & 온라인 테스트
면접 준비, 온라인 테스트, 튜토리얼, 라이브 연습을 위한 학습 플랫폼

집중 학습 경로, 모의고사, 면접 준비 콘텐츠로 실력을 키우세요.

WithoutBook은 주제별 면접 질문, 온라인 연습 테스트, 튜토리얼, 비교 가이드를 하나의 반응형 학습 공간으로 제공합니다.

Prepare Interview

Without Book 질문하기

Review the question and existing answers carefully before replying. The best answers explain the reasoning, steps, and tradeoffs so other learners can benefit too.

질문. Java outOfMemory exception in string.split

- Getting Java outOfMemory exception in string.split while reading each line for 60 MB file. Please suggest what need to be done?

작성일 Jul 12, 2014 작성자 Raman
답변. You should try first is reduce the file to small enough that it works. That will allow you to appraise just how large a problem you have.

Just a general Java note: don't write
String s1 = new String(tokens[0]);
String s2 = new String(tokens[1]);

Just need to write:
String s1 = tokens[0];
String s2 = tokens[1];

or even just use tokens[0] directly instead of s1, since it's about as clear.
작성일 Jul 12, 2014 작성자 Arindam

답변 입력

이름
이메일 주소
답변
보안 확인
계속하려면 풀어주세요: 8 + 5 = ?
Copyright © 2026, WithoutBook.