<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>eerga</author_name>
  <author_url>https://blog.hatena.ne.jp/eerga/</author_url>
  <blog_title>試したこととか困ったこととか</blog_title>
  <blog_url>https://eerga.hatenadiary.org/</blog_url>
  <categories>
    <anon>Java</anon>
  </categories>
  <description>privateコンストラクタにする理由がメモリ使用率だけなら、わざわざ不可視化しなくても良いのではないか？ 以下のようなコードをよく見かける。 public class HogeUtils { /** インスタンス化を防ぐ */ private HogeUtils() { }; private String foo() { .... } 何でprivateコンストラクタにしてまでインスタンス化を防ぐのか日本のGoogle先生に聞くと 次のような主旨のような回答が返ってくる。 無駄なインスタンス化を防いでメモリ消費(GC発生)を防ぐ 今の実行環境*1でこれを気にする必要があるのだろうか？priv…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Feerga.hatenadiary.org%2Fentry%2F20140811%2F1407748529&quot; title=&quot;ユーティリティクラスのコンストラクタをprivateにする十分な理由が分からない - 試したこととか困ったこととか&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2014-08-11 18:15:29</published>
  <title>ユーティリティクラスのコンストラクタをprivateにする十分な理由が分からない</title>
  <type>rich</type>
  <url>https://eerga.hatenadiary.org/entry/20140811/1407748529</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
