public class Solution {
public int[] twoSum(int[] nums, int target) {
for(int x=0; x<nums.length1; x++){
for(int y=x+1; y<nums.length; y++){
if(nums[x]+nums[y]==target){
int[] data = {x+1,y+1};
return data;
}
}
}
return null;
}
}
Is my answer O(n2) runtime or O(n) runtime?

Google is your guide! Try something like BigO complexity, Algorithm complexity analysis etc.
http://discrete.gr/complexity/
http://bigocheatsheet.com/