title: How to assign new variable with value from KStream<String, Float>
body: <p>I want to assign new variable name <em>&quot;ttt&quot;</em> with value from  KStream&lt;String, Float&gt; name <em>&quot;stream_ind&quot;</em>. I tried</p>
  <pre><code>final float tmp[] = new float[1];
  stream_ind.foreach((k,v)-&gt;{
    if(k.equals(&quot;0&quot;))
      tmp[0]=v;
  });
  float ttt = tmp[0];
  
  </code></pre>
  <p>but <em>&quot;ttt&quot;</em> return 0.0 not value from <em>&quot;stream_ind&quot;</em>,
  example of output</p>
  <pre><code>stream_ind.foreach((k,v) -&gt; System.out.println(&quot;key = &quot;+String.valueOf(k)+&quot; value = &quot;+String.valueOf(v)+&quot; [&quot;+String.valueOf(ttt)+&quot;]&quot;));
  &gt;&gt;&gt;output&gt;&gt;&gt; key = 0 value = 61229.71 [0.0]
  </code></pre>