Results 1 to 2 of 2
Thread: Print variable data type
- 01-14-2011, 05:32 PM #1
Member
- Join Date
- Nov 2010
- Posts
- 22
- Rep Power
- 0
-
Your code won't compile with the line:
Java Code:int b = 1/2.2;
Regarding your question, you can use reflection to get the data types of a class's fields, but I don't think it will work for variables inside of a method or other block.
Similar Threads
-
do while (variable != type)
By Romally in forum New To JavaReplies: 2Last Post: 11-15-2010, 06:29 AM -
Print Variable From One Class to Output on another.
By Lyricid in forum New To JavaReplies: 8Last Post: 02-27-2010, 02:56 PM -
declare a private instance variable called ran of type random
By tinman in forum New To JavaReplies: 1Last Post: 12-09-2009, 01:57 AM -
print variable with paint(Graphics g) ??
By tghn2b in forum New To JavaReplies: 10Last Post: 12-29-2008, 01:11 PM -
[SOLVED] curiosity about String type variable
By monir6464 in forum Advanced JavaReplies: 1Last Post: 04-08-2008, 12:13 PM
Bookmarks