Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Rapalli Nikhil
Tree2
0 Answer(s)      3 years and 8 months ago
Posted in : Java Beginners


) Include a method that will multiply by three every node of the tree: public void triple() { ... } For example, the tree

                               t =                        3
                                                        /        \
                                                        /        \
                                                      4             5
                                                 /        \       /        \
                                               6           7      8        9

after doing t.triple(); should become 9 / \ / \ 12 15 / \ / \ 18 21 24 27 print("code sample");


Advertisement
View Answers

Related Tutorials/Questions & Answers:
Tree2
Tree2  ) Include a method that will multiply by three every node of the tree: public void triple() { ... } For example, the tree t = 3
Adding Line to JTree
creates a box and two trees (tree1 and tree2). These trees contains the multiple...;JTree tree2 = new JTree();   JScrollPane scroll2 = new JScrollPane(tree2);   box.add(scroll1, 
Advertisements
Advertisements
 

 

 

DMCA.com