Friday, July 31, 2020

JAVA Code to convert Bytes into MB

Here is the JAVA Code to convert bytes in MB upto 1 decimal place.

public void getSizeInMB()
    {
        long sizeinBytes = 200*1024;
                long sizeInKB = sizeinBytes/1024;
                long sizeInMBInt = sizeInKB/1024;
                float sizeInMB = sizeInKB/1024.0f;
                String size = sizeInMB+"";

                int k = size.indexOf('.');
                size = sizeInMBInt+"."+size.charAt(k+1);
   
      System.out.print(size);
    }

21 comments:

  1. It is really what I wanted to see hope in future you will continue for sharing such a excellent post. 먹튀검증

    ReplyDelete
  2. hi sir you have written a very important something. I like your every point you dropped 슈어벳

    ReplyDelete
  3. "Hi there, I enjoy reading all of your article.
    I like to write a little comment to support you." 토토사이트

    ReplyDelete
  4. "It's very effortless to find out anyy topic onn net as compared to books, ass I found this post
    at this web page." 먹튀폴리스

    ReplyDelete
  5. "Nice post. I used to be checking constantly this blog and I am
    inspired! Very useful information particularly the remaining section �� I maintain such info
    a lot. I was looking for this particular info for a very lengthy time.

    Thank you and best of luck." 먹튀폴리스

    ReplyDelete
  6. Very good post.Really looking forward to read more. Really Great. 토토

    ReplyDelete
  7. "Really enjoyed this blog article.Much thanks again. Cool.

    " 토토

    ReplyDelete
  8. Whenever I have some free time, I visit blogs to get some useful info. Today, I found your blog with the help of Google ; I found it one of the most informative blog 토토사이트

    ReplyDelete
  9. "Really enjoyed this blog article.Much thanks again. Cool.

    " 메이저사이트

    ReplyDelete
  10. This was really an interesting topic and I kinda agree with what you have mentioned here! สล็อตแตกง่าย

    ReplyDelete
  11. Your article has answered the question I was wondering about! I would like to write a thesis on this subject, but I would like you to give your opinion once :D카지노슬롯


    ReplyDelete
  12. Cita previa INEM SEPE. Para tu comodidad, sin que te sea necesario que acudas a la Oficina de Empleo, el SEPE pone a tu disposición en esta página web actualizada continua mente.

    ReplyDelete
  13. Busca en el mapa Europeo la ubicación de cada uno de los países de los Mapa de Europa por los que te preguntan. Amplía o reduce el mapa con el zoom y ajústalo bien.

    ReplyDelete
  14. La para tener mejor informacion sober como solicitar Cita Previa DNI a fin de obtener o renovar tanto su DNI como su Pasaporte.

    ReplyDelete
  15. This is a great post I seen because of offer it. It is truly what I needed to see seek in future you will proceed after sharing such a magnificent post. cómo hacer

    ReplyDelete
  16. I have read your blog it is very helpful for me. I want to say thanks to you. I have bookmark your site for future updates. مباريات اليوم بث مباشر

    ReplyDelete
  17. It's too bad to check your article late. I wonder what it would be if we met a little faster. I want to exchange a little more, but please visit my site 온라인카지노 and leave a message!!


    ReplyDelete
  18. stunning, great, I was wondering how to cure skin break out ordinarily. likewise, found your site by google, took in an extraordinary arrangement, now i'm fairly clear. I've bookmark your site and moreover incorporate rss. keep us invigorated. مسلسلات رمضان

    ReplyDelete
  19. Pretty section of content. I just stumbled upon your weblog and in accession capital to assert that I get actually enjoyed account your blog posts. Any way I will be subscribing to your augment and even I achievement you access consistently quickly.  سيما لايت

    ReplyDelete
  20. Thank you for taking the time to write such an informative post. Your blog is not only informative, but it is also very creative. android app agency

    ReplyDelete