Given that a Date class exists in both the java.util and java.sql packages, what is the
result of compiling the following class?
1: import java.util.*;
2: import java.sql.*;
3: public class BirthdayManager {
4: private Date rob = new Date();
5: private java.util.Date sharon = new java.util.Date();
6: }
A. The code does not compile because of lines 1 and 2.
B. The code does not compile because of line 4.
C. The code does not compile because of line 5.
D. The code compiles without issue.
Derleme sonucu ne olur diyo , arkadaşlar Date sınıfı genel kültür olarak da bilmeniz gerekiyo java da :) her iki packagede de bulunur.java.util.Date ve java.sql.Date vardır.4.satırda ne yapacağını bilmez çünkü hangi Date sınıfını kullandığınızı java anlamaz eğer ki doğru düzgün hangi Date classını kullacağınızı söylemek istiyorsanız satır 5 deki gibi gösterebilirsiniz.Cevap b code 4.satır yüzünden derlenmez.