+ Reply to Thread
Results 1 to 2 of 2

Thread: How to cause overflow

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Posts
    34

    How to cause overflow

    I want to test a software and i`d like to cause an overflow , how can i quickly do that ?

  2. #2
    Junior Member
    Join Date
    Jan 2012
    Posts
    35
    Inside main and add :
    Code:
     public static void main(String[] args) {
     int[] a = new int[Integer.MAX_VALUE];
     }
    That should fill the array with the maximum integar value which will cause memory overflow

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts