It should work but my comp can't compute it in time. It is Project Euler problem 12. Just a small bit of advice would be nice. Only at this a short time so I probably just haven't learned a good way to manipulate the situation yet.
public class HighlyDivisibleTriangularNumber{
public static void main(String args[]){
long count = 1, sum = 0, i;
for(i = 1; count != 500; i++){
sum += i;
if(sum % 2 == 0 && sum % 3 == 0) count = 3;
else count = 2;
for(int j = 4; j <= sum/2; j++)
if(sum % j == 0) count++;
}
System.out.println(i-1);
}
}